public class No_99 { public static void main(String[] args) { java.util.Scanner sc = new java.util.Scanner(System.in); int num = sc.nextInt(); int n = 0; int even = 0; int odd = 0; for (int i = 0; i < num; i++) { n = sc.nextInt(); if (n % 2 == 0) even++; else odd++; } System.out.println(Math.abs(even - odd)); sc.close(); } }