#include using namespace std; int main(void){ 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 + 1] - a[i] == 1){ cout << 2 << endl; return 0; } } cout << 1 << endl; return 0; }