Number of maximal digits#8631

Number of maximal digits

1 second
128 megabytes
Very easy

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

Input

One positive integer n\:(n < 10^{18}).

Output

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

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading