Problem U: Happy MapleStory

Problem U: Happy MapleStory

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 333  Solved: 62
[Submit] [Status] [Web Board] [Creator:]


Magic Dense Forest is one of the game maps of the Korean 2D horizontal version game adventure island online. Magic Dense Forest is the career of adventure island-magician's place of transfer. Located in the east of Jinyin Island, it is a mysterious forest. Monsters are widely distributed, but background music and background pictures are too mysterious. There are not many players in magic dense forest, but there are many trees in the magic dense forest. Each tree has its own growth height. A tree of the same height is called a tree of the same species.
Adventurer Lx finally reached level 10 after painstaking brushing, and was able to move to the magic forest. Now the job is to find a mysterious tree in the magic forest, which accounts for more than half of all trees. Now output the height of the tree.


The first line input one positive integers N as the number of the trees. (N <= 10000000)
The second line input N numbers a[i] as the height of tree. (0 <= |a[i]| <= 10000000)


output the mysterious tree height. 

Sample Input Copy

3 2 3 3 -1

Sample Output Copy