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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = in.nextLong();
            int f = 27 * 200 + 10;
            int[][][] dp = new int[k + 1][f][2];
            boolean[][][] v = new boolean[2][k + 1][f];
            int ret = 0;
            v[0][0][0] = true;
            for (int i = 0; i < n; i++) {
                int fives = 0;
                int twos = 0;
                long cur = a[i];
                while (cur % 5 == 0) {
                    fives++;
                    cur /= 5;
                }
                cur = a[i];
                while (cur % 2 == 0) {
                    twos++;
                    cur /= 2;
                }
                for (int j = 0; j <= k; j++)
                    Arrays.fill(v[(i + 1) % 2][j], false);
                for (int j = 0; j < k; j++) {
                    for (int asdf = 0; asdf < f - 30; asdf++) {
                        if (v[i % 2][j][asdf]) {
                            v[(i + 1) % 2][j][asdf] = true;
                            v[(i + 1) % 2][j + 1][asdf + fives] = true;

                            dp[j][asdf][(i + 1) % 2] = Math.max(dp[j][asdf][(i + 1) % 2], dp[j][asdf][i % 2]);
                            ret = Math.max(ret, Math.min(asdf, dp[j][asdf][(i + 1) % 2]));

                            if (j + 1 <= k) {
                                dp[j + 1][asdf + fives][(i + 1) % 2] = Math.max(dp[j + 1][asdf + fives][(i + 1) % 2], dp[j][asdf][i % 2] + twos);
                                ret = Math.max(ret, Math.min(asdf + fives, dp[j + 1][asdf + fives][(i + 1) % 2]));
                            }

                        }
                    }
                }
            }
            out.print(ret);
        }

    }

    static class FastReader {
        private final BufferedReader reader;
        private StringTokenizer token;

        public FastReader(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in), 1 << 20);
        }

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

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

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

    }
}

