import sequtils,strutils,math var N = stdin.readline L = stdin.readline.split.map(parseInt) level : array[1..6,int] for l in L: level[l] += 1 var ans,a : int a = max(level) for i,l in level: if a == l: ans = i echo ans