#include #include #include #include #include #include #include #include #include using namespace std; int main() { int N; cin >> N; int odd = 0; int even = 0; for (int i=0;i < N;i++){ int t; cin >> t; if (t%2 == 0){ even++; }else{ odd++; } } int ans; if (even - odd >= 0){ ans = even - odd; }else{ ans = odd - even; } cout << ans << endl; return 0; }