#include int main(){ int a[100000]={},l[7]={},n; scanf("%d",&n); while(n--)scanf("%d",a+n); while(a[++n])l[a[n]]++; *a=0;n=7; while(n--)l[n]>l[*a]&&(*a=n); printf("%d",*a); return 0; }