using System; using System.Collections.Generic; using System.Linq; namespace Test { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); int ret = 0; for (int i = 0; i < n; i++) { ret += x[i] % 2 == 0 ? 1 : -1; } Console.WriteLine(Math.Abs(ret)); } } }