eolymp
bolt
Try our new interface for solving problems
Problems

Number of maximal digits

Number of maximal digits

Find out how many times the maximum digit appears in the positive integer $n$. \InputFile One positive integer $n\:(n < 10^{18})$. \OutputFile Print how many times the maximum digit appears in the positive integer $n$.
Time limit 1 second
Memory limit 128 MiB
Input example #1
2354
Output example #1
1
Input example #2
606432232464626
Output example #2
5