시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB140957866.102%

문제

You are to write a program, which, given N positive integer values X1, X2, ..., XN, computes the smallest number Xi that appears in the sequence at least as many times as any other number.

입력

The first line contains a single integer N. Line i+1 (for i = 1, 2, ..., N) contains one integer Xi.

출력

The first line is to contain one integer, the smallest number to appear at least as many times as any other number.

제한

  • 2 ≤ N ≤ 1000
  • 1 ≤ Xi ≤ 10000

예제 입력 1

10
1
2
3
4
5
3
2
3
1
2

예제 출력 1

2