#include using namespace std; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); 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 + 1 < n; i++) if (a[i] + 1 >= a[i + 1]) { cout << 2 << "\n"; return 0; } cout << 1 << "\n"; }