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.*;
import java.util.*;
import java.awt.Point;

public class CF_1133E {
    static final String name = "CF_1133E";
    static final boolean test = new File(name + ".in").exists();

    public static void main(String args[]) throws Exception {
        BufferedScanner in = new BufferedScanner(test ? new FileInputStream(name + ".in") : System.in);
        BufferedPrinter out = new BufferedPrinter(test ? new FileOutputStream(name + ".out") : System.out);

        int n = in.nextInt(), k = in.nextInt();
        int[] a = in.nextN(n);

        Arrays.sort(a);

        int ret = 0;
        int[][] dp = new int[n + 1][k + 1];
        for (int i = 0; i < n; i++) {
            int j = i + 1;
            while (j < n && a[i] + 5 >= a[j]) j++;

            for (int l = 0; l < k; l++) {
                dp[j][l + 1] = Math.max(dp[j][l + 1], dp[i][l] + j - i);
                dp[i+1][l] = Math.max(dp[i+1][l], dp[i][l]);
            }

            ret = Math.max(ret, Arrays.stream(dp[i]).max().getAsInt());
        }
        ret = Math.max(ret, Arrays.stream(dp[n]).max().getAsInt());

        out.println(ret);

        out.close();
        in.close();
    }

    /**
     * My template below. FastIO and utility functions.
     * Minimized with https://codebeautify.org/javaviewer.
     */

    // @formatter:off
    static<T>ArrayList<ArrayList<T>>get2D(int n){ArrayList<ArrayList<T>>ret=new ArrayList<>();for(int i=0;i<n;i++)ret.add(new ArrayList<>());return ret;}
    static void force(boolean condition){if(!condition)throw new IllegalStateException();}
    static void debug(Object obj){if(obj instanceof long[][]){for(long[]a:(long[][])obj)System.out.println(Arrays.toString(a));}
    else if(obj instanceof int[][]){for(int[]a:(int[][])obj)System.out.println(Arrays.toString(a));}
    else if(obj instanceof char[][]){for(char[]a:(char[][])obj)System.out.println(Arrays.toString(a));}
    else if(obj instanceof boolean[][]){for(boolean[]a:(boolean[][])obj)System.out.println(Arrays.toString(a));}
    else if(obj instanceof long[]){System.out.println(Arrays.toString((long[])obj));}
    else if(obj instanceof int[]){System.out.println(Arrays.toString((int[])obj));}
    else if(obj instanceof char[]){System.out.println(Arrays.toString((char[])obj));}
    else if(obj instanceof boolean[]){System.out.println(Arrays.toString((boolean[])obj));}
    else{System.out.println(obj);}}
    static class BufferedPrinter{PrintWriter out;BufferedPrinter(OutputStream out){this(new OutputStreamWriter(out));}
    BufferedPrinter(Writer out){this.out=new PrintWriter(new BufferedWriter(out));}
    void print(Object...os){for(int i=0;i<os.length;i++){if(i!=0)out.print(' ');out.print(os[i]);}}
    void println(Object...os){print(os);out.println();}
    void close(){out.close();}
    void flush(){out.flush();}}
    static class BufferedScanner{private final InputStream in;private final byte[]buf=new byte[1<<13];int pos,count;BufferedScanner(InputStream in)throws IOException{this.in=in;}
    long nextLong()throws IOException{return Long.parseLong(next());}
    int[]nextN(int n)throws IOException{int[]ret=new int[n];for(int i=0;i<n;i++)ret[i]=this.nextInt();return ret;}
    long[]nextNL(int n)throws IOException{long[]ret=new long[n];for(int i=0;i<n;i++)ret[i]=this.nextLong();return ret;}
    private int read(){if(count==-1)err();try{if(pos>=count){pos=0;count=in.read(buf);if(count<=0)return-1;}}catch(IOException e){err();}
    return buf[pos++];}
    private static boolean isSpace(int c){return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;}
    private int readSkipSpace(){int ret;do{ret=read();}while(isSpace(ret));return ret;}
    int nextInt(){int sign=1;int c=readSkipSpace();if(c=='-'){sign=-1;c=read();}
    int ret=0;do{if(c<'0'||c>'9')err();ret=ret*10+c-'0';c=read();}while(!isSpace(c));return sign*ret;}
    String next(){StringBuilder sb=new StringBuilder();int c=readSkipSpace();do{sb.append((char)c);c=read();}while(!isSpace(c));return sb.toString();}
    private void err(){throw new InputMismatchException();}
    void close()throws IOException{in.close();}}
    // @formatter:on
}