import java.util.*; import java.math.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int a = 0; int b = 0; ArrayList list = new ArrayList(); for(int i = 0; i < N; i++) { list.add(sc.nextInt()); } Collections.sort(list); boolean ok = true; while(ok) { ok = false; for(int i = 1; i < list.size(); i++) { if(list.get(i) % 2 != list.get(i-1) % 2) { list.remove(i-1); list.remove(i-1); i -= 2; ok = true; } } } System.out.println(list.size()); } }