n = gets.to_i x = gets.split.map(&:to_i) odd = 0 even = 0 n.times do |i| if x[i].abs % 2 == 1 odd += 1 else even += 1 end end puts (odd - even).abs