The Saratov State University Olympiad Programmers Training Center (SSU OPTC) has n students. For each student you know the number of times he/she has participated in the ACM ICPC world programming championship. According to the ACM ICPC rules, each person can participate in the world championship at most 5 times.

The head of the SSU OPTC is recently gathering teams to participate in the world championship. Each team must consist of exactly three people, at that, any person cannot be a member of two or more teams. What maximum number of teams can the head make if he wants each team to participate in the world championship with the same members at least k times?

Input

The first line contains two integers, n and k (1 ≤ n ≤ 2000; 1 ≤ k ≤ 5). The next line contains n integers: y1, y2, ..., yn (0 ≤ yi ≤ 5), where yi shows the number of times the i-th person participated in the ACM ICPC world championship.

Output

Print a single number — the answer to the problem.

Examples

Input

5 2
0 4 5 1 0


Output

1


Input

6 4
0 1 2 3 4 5


Output

0


Input

6 5
0 0 0 0 0 0


Output

2

Note

In the first sample only one team could be made: the first, the fourth and the fifth participants.

In the second sample no teams could be created.

In the third sample two teams could be created. Any partition into two teams fits.
import java.awt.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.StringTokenizer;

import static java.lang.Math.max;
import static java.lang.System.exit;

public class Main implements Runnable {
    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    final Scanner in;
    Writer out;
    long timeBegin, timeEnd;

    public Main() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        if (ONLINE_JUDGE) {
            in = new Scanner(new InputStreamReader(System.in));
            out = new Writer(System.out);
        } else {
            in = new Scanner(new FileReader("input.txt"));
            //out = new Writer("output.txt");
            out = new Writer(System.out);
        }
    }

    public static void main(String[] args) throws FileNotFoundException {
        new Thread(null, new Main(), "", 128 * (1L << 20)).start();
    }

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time: " + (timeEnd - timeBegin) + "ms");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            exit(-1);
        }
    }

    void solve() throws IOException {
        int n = in.nextInt(), k = in.nextInt();
        int[] a = in.nextIntArray(n);
        int c = 0;
        for (int i = 0; i < n; i++) {
            if (a[i] <= 5 - k)
                c++;
        }
        out.println(c / 3);
    }
}

class Scanner {
    BufferedReader in;
    StringTokenizer stringTokenizer;

    public Scanner(InputStreamReader inputStreamReader) throws FileNotFoundException {
        in = new BufferedReader(inputStreamReader);
    }

    String next() {
        while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {
            try {
                stringTokenizer = new StringTokenizer(in.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return stringTokenizer.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    int[] nextIntArray(int size) throws IOException {
        int[] array = new int[size];
        for (int index = 0; index < size; ++index) {
            array[index] = nextInt();
        }
        return array;
    }

    ArrayList<Integer> nextIntArrayList(int size) {
        ArrayList<Integer> result = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            result.add(nextInt());
        }
        return result;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    long[] readLongArray(int size) throws IOException {
        long[] array = new long[size];
        for (int index = 0; index < size; ++index) {
            array[index] = nextLong();
        }
        return array;
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    double[] readDoubleArray(int size) throws IOException {
        double[] array = new double[size];

        for (int index = 0; index < size; ++index) {
            array[index] = nextDouble();
        }

        return array;
    }

    char nextChar() throws IOException {
        int intValue = in.read();
        while (intValue == 10 || intValue == 13) {
            intValue = in.read();
        }
        if (intValue == -1) {
            return '\0';
        }
        return (char) intValue;
    }

    char[] readCharArray() throws IOException {
        return nextLine().toCharArray();
    }

    BigInteger readBigInteger() throws IOException {
        return new BigInteger(next());
    }

    BigDecimal readBigDecimal() throws IOException {
        return new BigDecimal(next());
    }

    Point nextPoint() throws IOException {
        int x = nextInt(), y = nextInt();
        return new Point(x, y);
    }

    Point[] nextPointArray(int size) throws IOException {
        Point[] array = new Point[size];

        for (int index = 0; index < size; ++index) {
            array[index] = nextPoint();
        }

        return array;
    }

    List<Integer>[] readGraph(int vertexNumber, int edgeNumber) throws IOException {
        @SuppressWarnings("unchecked")
        List<Integer>[] graph = new List[vertexNumber];

        for (int index = 0; index < vertexNumber; ++index) {
            graph[index] = new ArrayList<>();
        }

        while (edgeNumber-- > 0) {
            int from = nextInt() - 1;
            int to = nextInt() - 1;

            graph[from].add(to);
            graph[to].add(from);
        }

        return graph;
    }


    String nextLine() {
        String str = "";
        try {
            str = in.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}

class Writer extends PrintWriter {
    final int DEFAULT_PRECISION = 12;

    int precision;
    String format, formatWithSpace;

    {
        precision = DEFAULT_PRECISION;

        format = createFormat(precision);
        formatWithSpace = format + " ";
    }

    public Writer(OutputStream out) {
        super(out);
    }

    public Writer(String fileName) throws FileNotFoundException {
        super(fileName);
    }

    public int getPrecision() {
        return precision;
    }

    public void setPrecision(int precision) {
        precision = max(0, precision);
        this.precision = precision;

        format = createFormat(precision);
        formatWithSpace = format + " ";
    }

    public <T> void printMany(List<T> list) {
        for (T element : list) {
            print(element);
            print(" ");
        }
    }

    public void printMany(int[] a) {
        for (int element : a) {
            print(element);
            print(" ");
        }
    }

    private String createFormat(int precision) {
        return "%." + precision + "f";
    }

    @Override
    public void print(double d) {
        printf(format, d);
    }

    public void printWithSpace(double d) {
        printf(formatWithSpace, d);
    }

    public void printAll(double... d) {
        for (int i = 0; i < d.length - 1; ++i) {
            printWithSpace(d[i]);
        }

        print(d[d.length - 1]);
    }

    @Override
    public void println(double d) {
        printlnAll(d);
    }

    public void printlnAll(double... d) {
        printAll(d);
        println();
    }
}