#include using namespace std; int main() { int n,x,e=0,o=0; cin>>n; while(n--) { cin>>x; if(x%2==0) { e++; } else { o++; } } cout << abs(e-o) << endl; return 0; }