use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut s = s.trim().split_whitespace(); let _n: i32 = s.next().unwrap().parse().unwrap(); let x: Vec = s.map(|e| e.parse().unwrap()).collect(); let mut ans: i32 = 0; for i in x { if i % 2 == 0 { ans += 1; } else { ans -= 1; } } println!("{}", ans.abs()); }