Most Frequent
/

## Challenge

Problem
Editorial
Analytics

This is one of the most easiest problem you will ever code.

Mr. Bournville loves programming and he likes to face new programming challenges. After completing many challenges he has now given you one challenge which is one of his favourites. He has given you a list of N random integers and he wants you to find the integer which has the maximum frequency in the given list.

Formula for calculating the score : (max_score) - (number of characters in your code/15.0)

Mr. Bournville already has a solution for this but he is not satisfied with his solution. He wants you to write a shortest possible code for this task. In case Frequency of two numbers is same print the smaller one

Input:
First line of input contains N, number of integers.
Second line will contains N spaces separated integers.

Output:
Print the most frequent integer.

Contraints:
3<=N<=104
-106<=Integer<=106

NOTE : Score will awarded after passing all the test files.

SAMPLE INPUT
5
1 1 1 2 2
SAMPLE OUTPUT
1
Explanation

Clearly, count of 1 more than count of 2.

Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB

## This Problem was Asked in

Initializing Code Editor...