#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair int main() { int N; cin >> N; vector a(N); rep(i, N) cin >> a[i]; sort(a.begin(), a.end()); int ans = 1; rep(i, N-1) { if (a[i] + 1 >= a[i+1]) ans++; } cout << ans << endl; }