#!/bin/ruby n = gets.strip.to_i types = gets.strip types = types.split(' ').map(&:to_i) p (1..5).max_by{|x|types.count(x)}