stdin.ReadLine() |> ignore stdin.ReadLine().Split(' ') |> Seq.map int |> Seq.groupBy int |> Seq.maxBy (snd >> Seq.length) |> fst |> printfn "%d"