#include #include using namespace std; int main() { int n,x,e = 0,o = 0; cin >> n; for(int i = 0; i < n; i++){ cin >> x; if(x % 2 == 0) e++; else o++; } cout << abs(e-o) << endl; return 0; }