#include #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; using ll = long long ; using P = pair ; using pll = pair; constexpr ll INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 1000000007; constexpr double PI = 3.14159265358979323846; int main(){ int n; cin >> n; vector a(n); rep(i,n) cin >> a[i]; set st; rep(i,n) st.insert(a[i]); int cnt = 0; while(!st.empty()){ auto it = st.begin(); while(it != st.end()){ auto itr = st.upper_bound((*it)+1); if(itr == st.end()){ st.erase(it); break; } else{ st.erase(it); it = itr; } } ++cnt; } cout << cnt << endl; return 0; }