Let's call the roundness of the number the number of zeros to which it ends.

You have an array of n numbers. You need to choose a subset of exactly k numbers so that the roundness of the product of the selected numbers will be maximum possible.

Input

The first line contains two integer numbers n and k (1 ≤ n ≤ 200, 1 ≤ k ≤ n).

The second line contains n space-separated integer numbers a1, a2, ..., an (1 ≤ ai ≤ 1018).

Output

Print maximal roundness of product of the chosen subset of length k.

Examples

Input

3 2
50 4 20


Output

3


Input

5 3
15 16 3 25 9


Output

3


Input

3 3
9 77 13


Output

0

Note

In the first example there are 3 subsets of 2 numbers. [50, 4] has product 200 with roundness 2, [4, 20] — product 80, roundness 1, [50, 20] — product 1000, roundness 3.

In the second example subset [15, 16, 25] has product 6000, roundness 3.

In the third example all subsets has product with roundness 0.
import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {

        new Main().go();
    }

    PrintWriter out;
    Reader in;
    BufferedReader br;

    Main() throws IOException {

        try {

            //br = new BufferedReader( new FileReader("input.txt") );
            in = new Reader("input.txt");
            out = new PrintWriter( new BufferedWriter(new FileWriter("output.txt")) );
        }
        catch (Exception e) {

            //br = new BufferedReader( new InputStreamReader( System.in ) );
            in = new Reader();
            out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );
        }
    }

    int inf = 2000000000;
    int mod = 1000000007;
    double eps = 0.00000001;

    int n;
    int m;

    //ArrayList<Pair>[] g = new ArrayList[2000000];

    int z = 400010;


    void solve() throws IOException {

        int n = in.nextInt();
        int k = in.nextInt();

        int[][] cnt = new int[n][2];

        for (int i = 0; i < n; i++) {

            long x = in.nextLong();

            while (x%2 == 0) {
                cnt[i][0]++;
                x /= 2;
            }

            while (x%5 == 0) {
                cnt[i][1]++;
                x /= 5;
            }
        }

        int[][] dp = new int[5300][210];

        for (int i = 0; i <= 5200; i++)
            for (int j = 0; j < k+1; j++)
                dp[i][j] = -1;

        dp[0][0] = 0;

        //System.err.println(cnt[2][0]+" "+cnt[2][1]);

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

        int max = 0;

        for (int i = 0; i <= 5200; i++)
            for (int j = 0; j < k+1; j++)
                if (dp[i][j] != -1)
                    max = Math.max(max, Math.min(i, dp[i][j]));

        out.println(max);
    }

    void go() throws IOException {

        int t = 1;
        int cs = 1;

        while (t > 0) {
            solve();
            //out.println();
            cs++;
            t--;
        }

        out.flush();
        out.close();
    }

    class Pair implements Comparable<Pair>{

        int a;
        int b;

        Pair(int a, int b) {

            this.a = a;
            this.b = b;
        }

        public int compareTo(Pair p) {

            if (b > p.b) return 1;
            if (b < p.b) return -1;
            if (a > p.a) return 1;
            if (a < p.a) return -1;
            return 0;
        }
    }

    class Item {

        int a;
        int b;
        int c;

        Item(int a, int b, int c) {
            this.a = a;
            this.b = b;
            this.c = c;
        }

    }

    class Reader {

        BufferedReader  br;
        StringTokenizer tok;

        Reader(String file) throws IOException {
            br = new BufferedReader( new FileReader(file) );
        }

        Reader() throws IOException {
            br = new BufferedReader( new InputStreamReader(System.in) );
        }

        String next() throws IOException {

            while (tok == null || !tok.hasMoreElements())
                tok = new StringTokenizer(br.readLine());
            return tok.nextToken();
        }

        int nextInt() throws NumberFormatException, IOException {
            return Integer.valueOf(next());
        }

        long nextLong() throws NumberFormatException, IOException {
            return Long.valueOf(next());
        }

        double nextDouble() throws NumberFormatException, IOException {
            return Double.valueOf(next());
        }


        String nextLine() throws IOException {
            return br.readLine();
        }

    }

}