e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Week 4: November 30 – December 6. While Loop. Part 1

Number of maximal digits

Find out how many times the maximum digit appears in positive integer n.

Input

One positive integer n (n < 1018).

Output

Print how many times the maximum digit appears in positive integer n.

Time limit 1 second
Memory limit 128 MiB
Input example #1
2354
Output example #1
1