using System; using System.Linq; class No99{ static void Main(){ var count=Int32.Parse(Console.ReadLine()); var line=Console.ReadLine().Split(' ').Select(x=>Int32.Parse(x)); var gusu=line.Count(x=>x%2==0); Console.WriteLine(Math.Abs(count-2*gusu)); } }