Majority Element

medium

Mô tả

Tìm phần tử xuất hiện nhiều hơn n/2 lần trong mảng. Đảm bảo luôn có đáp án.

Input Format

Dòng 1: n.
Dòng 2: n số nguyên.

Constraints

1 ≤ n ≤ 100

Sample Input

7
3 3 4 2 4 4 2 4 4

Sample Output

4