Given a number N, the task is to find the highest occurring digit in prime numbers less or equal to N. If multiple digits have same highest frequency, print the largest of them.
Input Format
Input contains a single integer N.
Output Format
Output single integer denoting the answer.
Constraints :
2<=N<=10^6
Prime numbers less than 20 are 2, 3, 5, 7, 11, 13, 17, 19. 1 occur maximum i.e 5 times among 0 to 9.