#include<iostream> using namespace std; int main() { int n; cin>>n; int a=0,b=0; while(n--) { int x; cin>>x; if(x&1)a++; else b++; } if(a%2==0)cout<<b; else cout<<a<<endl; }