#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; int odd = 0, even = 0; for(int i = 0; i < n; i++) { int a; cin >> a; (a % 2 == 0 ? even++ : odd++); } cout << abs(even - odd) << endl; return 0; }