#include #define rep(i, a, n) for(int i = a; i < n; i++) #define repp(i, n) rep(i, 0, n) #define repb(i, a, b) for(int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define int long long using namespace std; //yuki 99 signed main(){ int n; cin >> n; int even = 0, odd = 0; rep(i, 0, n){ int a; cin >> a; if(a % 2) odd++; else even++; } cout << abs(odd - even) << endl; }