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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class d extends PrintWriter{
    static BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
    // static Scanner s=new Scanner(System.in);
    d() { super(System.out); }
    public static void main(String[] args) throws IOException{
        d d1=new d();d1.main();d1.flush();
    }void main() throws IOException {
        StringBuilder sb = new StringBuilder();
        PrintWriter out = new PrintWriter(System.out);
         String[] s1=s();
         int n=i(s1[0]);int k=i(s1[1]);
         String[]s2=s();
         int[] a=new int[n];for(int i=0;i<n;i++) {a[i]=i(s2[i]);}
         Arrays.sort(a);
         int[][] dp=new int[n][k];
         int l=0;
         int ans=0;

         for(int i=0;i<n;i++){
//             System.out.print(a[i]+" ");
             while(a[i]-a[l]>5) l++;
             dp[i][0]=i-l+1;
             ans=Math.max(ans,dp[i][0]);
             for(int j=1;j<k;j++){
                 if(l-1>=0&&dp[l-1][j-1]!=0)
                  dp[i][j]=dp[l-1][j-1]+i-l+1;
                // System.out.println(i+" "+j+" "+dp[i][j]);
                 ans=Math.max(ans,dp[i][j]);
               if(i>0) dp[i][j]=Math.max(dp[i][j],dp[i-1][j]);
             }
             if(i>0)
             dp[i][0]=Math.max(dp[i][0],dp[i-1][0]);
         }
        System.out.println(ans);


    }static StringBuilder sb1;
    static void dfs(ArrayList<Integer> [] adj,int [] vis,int i){
        vis[i]=1; if(adj[i]==null) return;
        for(Integer j:adj[i]){
            if(vis[j]==0){
                sb1.append(i+" "+j);
                dfs(adj,vis,j);
            }
        }
    }
      static int ft;static int ans;


    static String[] s() throws IOException {

        return s.readLine().trim().split("\\s+");
    }

    static int i(String ss) {
        return Integer.parseInt(ss);
    }
    static long l(String ss) {
        return Long.parseLong(ss);
    }
}
class node implements Comparator<node>{
    int ver,val;
    public node(){}
    public node(int ver,int val) {
        this.ver=ver;this.val=val;
    }public int compare(node n1,node n2){
       return n1.val-n2.val;
    }
}

class Student12 {
    int  l;int r;
    public Student12(int l, int r) {
        this.l = l;
        this.r = r;
    }

    public String toString()
    {
        return this.l+" ";
    }
}
class Sortbyroll12 implements Comparator<Student12> {

    public int compare(Student12 a, Student12 b){
        return a.l-b.l;
//        if(a.r<b.r) return 1;else if(a.r==b.r) return 0;else return -1;// a.r-b.r;
      /*  if(b.r<a.r) return -1;
        else if(b.r==a.r) return 0;
        return 1;*/

        //   return b.r-a.r;
       /*
       if(b.l<a.l) return -1;
       else if(b.l==a.l) {
           return b.r-a.r;
       }
       return 1;*/
        //        return b.r- a.r;
        //        return (int) a.l-(int) b.l;
         /*   if(a.r<b.r) return -1;
            else if(a.r==b.r){
                if(a.r==b.r){
                    return 0;
                }
                if(a.r<b.r) return -1;
                return 1;}
            return 1;  */}
}
class Node1 implements Comparator<Node1>{
    int node;long val;
    public  Node1(){}
    public  Node1(int node,long val){
        this.node=node;this.val=val;
    }
    @Override
    public int compare(Node1 a,Node1 b){
        if(a.val<b.val) return -1;
        if(a.val==b.val) return 0;
        {
            return 1;
        }
    }
}