#include #include using namespace std; using ll = long long int; int main(void){ int n, even, odd; cin >> n; ll x; for (int i = 0; i < n; i ++){ cin >> x; if (x % 2 == 0){ even ++; } else{ odd ++; } } if (even * odd == 0){ cout << n; } else if (n % 2 == 0){ cout << 0; } else{ cout << 1; } return 0; }