#include using namespace std; int main(void) { int n; cin >> n; int even = 0, odd = 0; for (int i = 0; i < n; i++) { int x; cin >> x; even += !(x & 1); odd += (x & 1); } cout << abs(even - odd) << endl; return 0; }