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