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

public class D {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        int k = sc.nextInt();
        short[] twos = new short[n], fives = new short[n];
        for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            while (x % 2 == 0) {
                x /= 2;
                twos[i]++;
            }
            while (x % 5 == 0) {
                x /= 5;
                fives[i]++;
            }
        }

        int MAX_FIVES = 26 * 200 + 2;
        short[][] dp = new short[k + 1][MAX_FIVES + 1];
        short[][] last = new short[k + 1][MAX_FIVES + 1];
        for (short[] m : last) Arrays.fill(m, (short)(-Short.MIN_VALUE + MAX_FIVES));
        last[1][fives[0]] = twos[0];
        last[0][0] = 0;
        for (int i = 1; i < n; i++) {
            for (int made = 0; made <= k; made++) {
                for (int fivesMade = 0; fivesMade <= MAX_FIVES; fivesMade++) {
                    short best = last[made][fivesMade];
                    if (fivesMade >= fives[i] && made >= 1)
                        best = (short) Math.max(best, twos[i] + last[made - 1][fivesMade - fives[i]]);
                    dp[made][fivesMade] = best;
                }
            }
            for (short[] m : last) Arrays.fill(m, (short)(-Short.MIN_VALUE + MAX_FIVES));
            for (int made = 0; made <= k; made++) {
                for (int fivesMade = 0; fivesMade <= MAX_FIVES; fivesMade++) {
                    last[made][fivesMade] = dp[made][fivesMade];
                }
            }
        }

        int best = 0;
        for (int fivesMade = 0; fivesMade <= MAX_FIVES; fivesMade++) {
            best = Math.max(best, Math.min(fivesMade, last[k][fivesMade]));
        }

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


























    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

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

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++)
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }
}