import Foundation let numCountsLine = readLine() let countsLine = readLine()! let countStrings = countsLine.components(separatedBy: " ") var counts: [(Int, Int)] = [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5)] for count in countStrings { guard let id = Int(count) else { continue } counts[id - 1].0 += 1 } counts = counts.sorted { t1, t2 in if t1.0 == t2.0 { return t1.1 < t2.1 } return t1.0 > t2.0 } print("\(counts[0].1)")