Problem: You are a coach at your local university. There are n students under your supervision, the programming skill of the i-th student is a_i.

You have to create a team for a new programming competition. As you know, the more students some team has the more probable its victory is! So you have to create a team with the maximum number of students. But you also know that a team should be balanced. It means that the programming skill of each pair of students in a created team should differ by no more than 5.

Your task is to report the maximum possible number of students in a balanced team.

Input

The first line of the input contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of students.

The second line of the input contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^9), where a_i is a programming skill of the i-th student.

Output

Print one integer — the maximum possible number of students in a balanced team.

Examples

Input


6
1 10 17 12 15 2


Output


3


Input


10
1337 1337 1337 1337 1337 1337 1337 1337 1337 1337


Output


10


Input


6
1 1000 10000 10 100 1000000000


Output


1

Note

In the first example you can create a team with skills [12, 17, 15].

In the second example you can take all students in a team because their programming skills are equal.

In the third example you can create a team consisting of a single student (and you cannot create a team consisting of at least two students).

Solution (in JAVA):

Solution:
  import java.util.*;
import java.lang.*;
import java.io.*;

public class Main
{
    static class Graph { 
     ArrayList<ArrayList<Integer>> a;
	 Graph(int n){
		a =new ArrayList<>(n+1);
		for (int i=0;i<n+1;i++){
			a.add(new ArrayList<Integer>()) ;
		}
	}
	public void addEdge(int k,int j){		
		a.get(k).add(j);
		a.get(j).add(k);
	}
  }
  static boolean visited[];
  static Graph G;
  static int par[];
  static void bfs()
			{
				Queue<Integer> q=new LinkedList<>();
					//hash=new HashMap<>();
				q.add(1);
				visited[1]= true;
				
				par[1]=1;
			//	int f=1;
				while(!q.isEmpty())
				{
					int x=q.poll();
					//ArrayList<Integer> al=a.get(x);
					ArrayList<Integer> al = new ArrayList<>(G.a.get(x));
						for(int i=0;i<al.size();i++)
					{
						int y=al.get(i);
						if(visited[y]==false)
						{
							q.add(y);
							par[y]= x;
							visited[y]=true;
						   //f= par[y];
						}
					}
				}
			}

	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		FastReader sc=new FastReader();
		int n= sc.nextInt();
	 ArrayList<Integer> a= new ArrayList<>();
	 int b[]= new int[n];
	 HashMap<Integer,Integer> h=new HashMap<>();
	 for(int i=0;i<n;i++)
	 {   int c= sc.nextInt();
	     if(!h.containsKey(c))
	     {a.add(c);
	     h.put(c,1);}
	     else
	     h.put(c,h.get(c)+1);
	     
	 }
	 Collections.sort(a);
	/* for(int i=0;i<a.size();i++)
	 {
	     if(i==0)
	     b[i]=0;
	     else
	     b[i]= b[i-1]+a.get(i)-a.get(i-1);
	 }*/
	 int i=0,j=1,max=0,m=h.get(a.get(0));
	 if(n>1)
	 {
	 while(j<a.size())
	 {
	     if((a.get(j)-a.get(i))<=5)
	     {
	         m= m+ h.get(a.get(j));
	         j++;
	     }
	     else
	     {
	        // i++;
	        // j=i+1;
	         if(m>max)
	         max=m;
	         m=m-h.get(a.get(i));
	         i++;
	     }
	 }
	 }
	 if(m>max)
	 max=m;
	 System.out.println(max);
	 }
	 
	 
	  static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
    static int gcd(int a,int b)
		{
		    if(a%b==0)
		    return b;
		    return gcd(b,a%b);
		}
		
	static ArrayList<Integer> sieve(int n) 
    { 
        ArrayList<Integer> arr=new ArrayList<Integer>();
        boolean prime[] = new boolean[n+1]; 
        for(int i=0;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
            if(prime[p] == true) 
            { 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 
          
        for(int i = 2; i <= n; i++) 
        { 
            if(prime[i] == true) 
                arr.add(i); 
        } 
        return arr;
    } 
      
	static float power(float x, int y) 
    { 
        float 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; 
        } 
    } 
    static long pow(int a,int b)
    {
        long result=1;
        if(b==0)
        return 1;
        long x=a;
        while(b>0)
        {
            if(b%2!=0)
            result*=x;
            
            x=x*x;
            b=b/2;
        }
        return result;
    }
}