#include #include using namespace std; int main(int argc, const char* argv[]) { int N; cin >> N; int X[N]; for (auto&& x : X) cin >> x; int v[2] = {0}; for (auto&& x : X) v[x % 2 == 0]++; cout << abs(v[0] - v[1]) << endl; return 0; }