// No.99 ジャンピング駒 // https://yukicoder.me/problems/no/99 // #include using namespace std; int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); int N; cin >> N; int even = 0; int odd = 0; for (auto i = 0; i < N; ++i) { int tmp; cin >> tmp; if (tmp % 2 == 0) ++even; else ++odd; } cout << abs(even - odd) << endl; }