#include using namespace std; int main(){ int n; cin >> n; bool odd = false; bool even = true; for(int i=0;i < n;i++){ int a; cin >> a; if(a % 2 == 0) even = true; else odd = true; } if(n == 1) cout << 1 << endl; else if(n == 2){ if(odd && even) cout << 2 << endl; else cout << 1 << endl; }else if(n == 3){ cout << 1 << endl; }else{ if(odd && even) cout << 2 << endl; else if(odd) cout << 1 << endl; else if(even) cout << 1 << endl; } return 0; }