eolymp
bolt
Try our new interface for solving problems

Digit

Vasya was tired of putting numbers together and he began to study their properties. At the moment he is interested in the question: what digit appears in the number the most often? If there are some answers, choose the smallest of them.

What digit did Vasya choose in the number?

Input

One number, considered by Vasya. The number of digits in the decimal number does not exceed 105.

Output

Print the digit chosen by Vasya.

Time limit 1 second
Memory limit 128 MiB
Input example #1
14221321
Output example #1
1
Source XX комплексная олимпиада "Турнир Чемпионов", Командный тур, Винница, 30 апреля 2013 г.