// Enter your code here import Foundation var typesCount: [Double] = Array(repeating: 0, count: 6) _ = readLine()! let birds = readLine()!.components(separatedBy: " ").map{ Int($0)! } for bird in birds { typesCount[bird] += 1 } var maxAindex:(Double, Int) = (0,1) var index = 1 var comp = 2 while(comp < 6) { if(typesCount[index] >= typesCount[comp]) { maxAindex = (typesCount[index],index) comp += 1 } else { maxAindex = (typesCount[comp],comp) index = comp comp += 1 } } print(maxAindex.1)