Extension for counting unique words with case-insensitive ignoring

Kotlin Medium extensions

Task «Extension for counting unique words with case-insensitive ignoring»

Write a Kotlin program that reads a string of text and uses an extension function for String to count the number of unique words in it. Words are separated by spaces, punctuation marks are ignored (removed). Letter case does not matter (words are converted to lowercase). The program should output only the number of unique words.

Input Format

One line containing text in Russian or English. The length of the line does not exceed 1000 characters.

Output Format

One integer — the number of unique words.

Examples

Example 1

INPUT
Hello world hello
OUTPUT
2

Example 2

INPUT
Kotlin is fun and kotlin is powerful
OUTPUT
5

Example 3

INPUT
Тест тест тест
OUTPUT
1
main.kt