using System; using System.Linq; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); int odd = 0; int even = 0; for (int i = 0; i < n; i++) { if (x[i] % 2 == 0) even++; else odd++; } Console.WriteLine(Math.Abs(even - odd)); } }