ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1510. Order

Time limit: 1.0 second
Memory limit: 16 MB
A New Russian Kolyan likes two things: money and order. Kolyan has lots of money, but there is no order in it. One beautiful morning Kolyan understood that he couldn't stand this any longer and decided to establish order in his money. He told his faithful mates to fetch the money from an underground depository, and soon his big room was filled up with red, green, and blue banknotes. Kolyan looked with disgust at this terrible mess. Now he wants to leave in his depository only banknotes of the same value and to give the rest of the money to the poor. He knows exactly that more than half banknotes have the same value. But in this mess it is impossible to understand which banknote is the most common.

Input

The first line contains the number of Kolyan's banknotes N (1 ≤ N ≤ 500000). In the next N lines, the values K of these banknotes are given (0 ≤ K ≤ 109). More than half of them are the same.

Output

Output the most common value.

Sample

inputoutput
5
3
3
2
2
3
3
Problem Author: Den Raskovalov
Problem Source: Quarter-Final of XXXI ACM ICPC - Yekaterinburg - 2006