n = gets.to_i x = gets.split.map(&:to_i) puts (n - 2 * x.count(&:odd?)).abs