#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) int N; signed main() { cin >> N; int cnt = 0; int x; REP(i,N) { cin>>x; x += 1e9; if (x % 2) cnt++; else cnt--; } cout << abs(cnt) << endl; return 0; }