We’re preparing your current view and syncing the latest data.
Anton has a set of lowercase English letters enclosed within curly braces and separated by commas, e.g., '{a,b,c}'. The task is to determine how many unique letters are present in this set.
A single line containing the string representation of the set, consisting of lowercase letters, commas, and curly braces.
Output a single integer denoting the number of distinct letters in the set.
The input string is non-empty and contains only lowercase English letters, commas, and curly braces.
Example 1
Input
{a,b,c}Output
3
Explanation
The distinct letters are a, b, and c.
Example 2
Input
{a,a,b,c}Output
3
Explanation
Even though 'a' appears twice, only unique letters are counted: a, b, and c.
Example 3
Input
{}Output
0
Explanation
No letters inside braces, so the count is zero.