#include using namespace std; int main() { int N; cin >> N; vector A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } sort(A.begin(), A.end()); for (int i = 0; i < N - 1; i++) { if (A[i] % 2 == A[i + 1] % 2) { continue; } else { if (A[i] + 1 < A[i + 1]) { continue; } } cout << "2"; return 0; } cout << 1; }