#include using namespace std; int main(){ int N, i, tmp; vector x; cin >> N; for(i = 0; i < N; i++){ cin >> tmp; x.push_back(tmp); } sort(x.begin(), x.end()); for(i = 0; i < N - 1; i++){ if((x[i + 1] - x[i])%2 != 0){ x.erase(x.begin() + i, x.begin() + i + 2); if(i == 0){ i -= 1; }else{ i -= 2; } } if(i + 1 == x.size()) break; if(x.size() == 0) break; } cout << x.size() << endl; return 0; }