import java.util.Scanner; public class No99 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int evencnt = 0; for(int i = 0;i < N;i++) { if(sc.nextInt() % 2 == 0) { evencnt++; } } System.out.println(Math.abs(2*evencnt - N)); } }