#include using namespace std; /* my general mistakes that costed me a lot * check for overflows * check and mod and use int type variables where possible to avoid tles * while multiplying two variables whose value can exceed integer limt make sure to typecase them * use scanf when you are not working with the best possible optimisation * return a value from a function that has a return type sometimes the compiler may give the correct answer but there will be problem in the judge * be very cautious about uninitiaalised variables , infact never keep them or handle them properly*/ #define ff first #define ss second #define mp make_pair #define pb push_back #define ll long long int #define pp pair #define ve vector #define mod 1000000007 #define mn 100010 long long int MOD=mod; long long int powe(ll a, ll b) { long long int x=1,y=a; while(b > 0) { if(b%2 == 1) { x=(x*y);x%=MOD; } y = (y*y);y%=MOD;b /= 2; } return x; } long long int InverseEuler(ll n) { return powe(n,MOD-2); } /************************************CODE BEGINS HERE************************/ int a[mn]; int main() { int t; // cin>>t; t=1; while(t--) { int n; cin>>n; int h[110]; memset(h,0,sizeof(h)); for(int i=0;i>a[i]; h[a[i]]++; } int ans=0; for(int i=1;i<=99;i++) { ans=max(ans,h[i]+h[i+1]); } cout<