#[allow(unused_macros)] macro_rules! invec { ( $t:ty ) => {{ let mut s = String::new(); match std::io::stdin().read_line(&mut s) { Ok(0) => Vec::<$t>::new(), Ok(n) => s.trim().split_whitespace().map(|s| s.parse::<$t>().unwrap()).collect::>(), Err(_) => Vec::<$t>::new(), } }} } #[allow(unused_macros)] macro_rules! input { ( $($t:ty),* ) => {{ let mut s = String::new(); std::io::stdin().read_line(&mut s); let mut splits = s.trim().split_whitespace(); ($( { splits.next().unwrap().parse::<$t>().unwrap() }, )*) }} } #[allow(unused_must_use)] #[allow(unused_variables)] fn solve() { let (n, ) = input!(usize); let ls = invec!(usize); let mut level_count = vec![0; 6]; for l in ls { level_count[l-1] += 1; } let mut max = 0; let mut max_index = 0; for i in 0..6 { if max <= level_count[i] { max_index = i; max = level_count[i] } } println!("{}", max_index + 1); } fn main() { solve(); }