Consider a string s of length n consisting of characters 0 to 9. Let be the number of distinct characters this string has, and be the number of times character c appears in the string. We call the string s happy if
For example strings and are NOT happy, but strings and are happy.
Given a string S, find the number of happy substrings(out of a total ) of S.
Input
The only line of the input contains the string S
Output
Print one line containing the number of happy substrings of S
Constraints