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