#C1394. Count Distinct Items in To-Do List

    ID: 43533 Type: Default 1000ms 256MiB

Count Distinct Items in To-Do List

Count Distinct Items in To-Do List

You are given a string representing a to-do list, with items separated by commas. Your task is to count the number of distinct items in the list. An item is considered distinct if, after removing extra whitespace and converting all letters to lowercase, it is different from every other item.

For instance, the items "Call mom" and " call MOM " are considered the same. Formally, if the processed items are represented as $s_1, s_2, \dots, s_n$, you must find \(N = |\{s_i : 1 \leq i \leq n\}|\), where the function processing each item is defined as \(f(item)=\text{lowercase}(\text{trim}(item))\).

inputFormat

The input is a single line string provided via standard input (stdin). This string contains a list of items separated by commas. Items may include extra spaces and letters in mixed case.

outputFormat

Output a single integer to standard output (stdout) representing the number of distinct items after trimming whitespace and converting to lowercase. In formulas, if $N$ is the number of distinct items, then output N.

## sample
Buy milk, Call mom , Clean the house, Buy milk, call mom, pay bills,  clean the house
4