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