use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut a = 0i32; s.split_whitespace() .skip(1) .flat_map(str::parse::) .for_each(|x| if x % 2 == 0 { a += 1 } else { a -= 1 }); println!("{}", a.abs()); }