using System; using System.Linq; class Program { static void Main(string[] args) { // No.99 ジャンピング駒 int N = int.Parse(Console.ReadLine()); long[] X = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray(); int odd = 0, even = 0; for (int i = 0; i < X.Length; i++) { if (Math.Abs(X[i] % 2) == 1) odd++; else even++; } Console.WriteLine(Math.Abs(odd-even)); } }