use std::{collections::HashMap, io::Read}; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let n: Vec = s.split_whitespace().skip(1).flat_map(str::parse).collect(); let mut h = HashMap::new(); n.iter() .for_each(|&x| *h.entry(x.abs() % 2).or_insert(0i32) += 1); println!("{}", (h[&0] - h[&1]).abs()); }