//An Emperor Production //in Association with Assistant Professor MR Ram Kripal Mishra. //Copyright (C) 2016,2015 CodeGeeks, Inc., //B-217 KIT, First Floor, Rooma, Kanpur, INDIA //Everyone is permitted to copy and distribute verbatim copies //of this code, but changing it is not allowed. #include using namespace std; #define ln pf("\n") #define I inr() #define C inc() #define S ins() #define sp pf(" ") #define loop(a,b) for(int i=a;i=b;i--) #define pb push_back #define ppb pop_back() #define pf printf #define pi pair #define sf scanf #define swi switch #define vec vector #define veci vector #define vecs vector #define MOD 1000000007 typedef long long ll; typedef string str; void ins(string &s){getline(cin,s);} int to_num(string s){return atoi(s.c_str());} double power(ll x, ll y){double temp;if( y == 0)return 1;temp = power(x, y/2);if (y%2 == 0)return temp*temp;else{if(y > 0)return x*temp*temp;else return (temp*temp)/x;}} str to_binary(ll n){str S;if(n==1)return "1";else{S+=to_binary(n>>1);S+=(n%2+'0');}return S;} ll inr(){ll V;cin>>V;return V;} str ins(){str s;cin>>s;return s;} char inc(){char c;cin>>c;return c;} int main() { int n=I; veci v; int has[1000]={}; loop(0,n) { v.pb(I); has[v[i]]++; } int Max=INT_MIN; int counter=0; for(int i=0;i<101;i++) { Max=max(Max,has[i]+has[i+1]); } cout<