#include using namespace std; #define ll long long map mp; map::iterator it; int main() { int n; cin>>n; mp.clear(); set s; for(int i=0;i>tmp; mp[tmp]++; s.insert(tmp); } int ans=0; int y=0; for(it=mp.begin();it!=mp.end();it++) { //y++; int tmp = it->first; int cnt = mp[tmp]; if(mp.count(tmp+1)) cnt+=mp[tmp+1]; ans = max(ans,cnt); // cout<