#include <iostream>
#include <map>
#include <algorithm>

using namespace std;

int main()
{
    int arr[] = { 1, 3, 876, 22, 456, 1, 456, 18, 34546, 1};

    map<int,int> m;
    for(auto i: arr) m[i]++;
    auto it = max_element(m.begin(),m.end(),[](auto a, auto b) { return a.second < b.second; });

    cout << it->first;

}
