#include #include int main() { size_t n; std::cin >> n; std::set st; for (size_t i = 0; i < n; i++) { int a; std::cin >> a; st.insert(a); } int ans = 0; while (not st.empty()) { int cur = *st.begin(); st.erase(st.begin()); ans++; while (not st.empty()) { auto next = st.upper_bound(cur + 1); if (next == st.end()) break; cur = *next; st.erase(next); } } std::cout << ans << '\n'; return 0; }