#K4821. Find Majority Element

    ID: 28370 Type: Default 1000ms 256MiB

Find Majority Element

Find Majority Element

You are given an array of n integers. It is guaranteed that a majority element exists in the array, where the majority element is defined as the element that appears more than \(\frac{n}{2}\) times.

Your task is to find and print the majority element.

inputFormat

The input is given in the following format via standard input (stdin):

The first line contains an integer n - the number of elements in the array.
The second line contains n space-separated integers representing the elements of the array.

outputFormat

Output the majority element as a single integer to standard output (stdout).

## sample
3
3 2 3
3

</p>