1781: 众数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:4 Solved:3

Description

对于一个长度为n的序列{an}来说,其众数被定义为出现次数最多的数。

现在给定一个长度为n的序列,yc想要你求出它的众数是多少。

当然众数可能有多个,你只需要输出最小的一个就可以了。

Input

第一行输入n,第二行输入n个数。

Output

输出众数。

Sample Input Copy

6
3 5 7 5 3 1

Sample Output Copy

3

Source/Category