The global replace function is a very useful feature. Using this function, you can easily modify strings in an editor.
Iris is a cute cat. She randomly tapped on oql's keyboard several times, which happened to form a string consisting only of lowercase letters.
oql especially likes the letter i. He wants to change all letters in this string to i, and is prepared to perform the following operation several times (it is possible that no operations are needed):
- Choose two letters $x, y$ from
a~z, and simultaneously replace all occurrences of $x$ in the string with $y$.
oql wants to know the minimum number of operations required to change all characters to i.
Input
A single line containing a string $s$ consisting of lowercase letters ($1 \le |s| \le 10^4$).
Output
A non-negative integer representing the minimum number of operations.
Examples
Input 1
thomasx
Output 1
7
Input 2
poria
Output 2
4