Tanmoy is an ACM ICPC contestant. During practice he came across a problem named ‘OWLLEN’.
He has having trouble solving this problem so he asked his elder brother for clues. His brother told him that if he wants to solve this problem, he must know how to solve another problem.
Now, Tanmoy needs your help. You need to show him how to solve that problem.
You will be given a large number and you will have to determine which digit in that number has been used the most number of times. If two different digits occur the same number of times print the smallest one.
There will be only one line containing a large number N (0 < N < 1010000).
You will have to print the digit that has been used the most number of times in that number.
In the number 1213, 1 is used 2 times, 2 is used 1 time and 3 is used 1 time. So the answer is 1.