#include <iostream>
using namespace std;
int main() {
int a,d=0,c;
int tab[10001];
while(cin>>a){
tab[a]++;
}
for(int i=0;i<10001;i++){
if(tab[i]>d){
d=i;
}
}
cout<<d;
return 0;
}
CiNpbmNsdWRlIDxpb3N0cmVhbT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IG1haW4oKSB7CiAgICBpbnQgYSxkPTAsYzsKICAgIGludCB0YWJbMTAwMDFdOwogICAgd2hpbGUoY2luPj5hKXsKICAgICAgICB0YWJbYV0rKzsKICAgIH0KICAgIAogICAgZm9yKGludCBpPTA7aTwxMDAwMTtpKyspewogICAgICAgIGlmKHRhYltpXT5kKXsKICAgICAgICAgICAgZD1pOwogICAgCiAgICAgICAgfQogICAgfQogICAgY291dDw8ZDsKICAgIHJldHVybiAwOwp9Cg==