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.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
 *
 * @author Washoum
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DRoundSubset solver = new DRoundSubset();
        solver.solve(1, in, out);
        out.close();
    }

    static class DRoundSubset {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            long[] tab = new long[n];
            for (int i = 0; i < n; i++) {
                tab[i] = sc.nextLong();
            }
            int[] two = new int[n];
            int[] five = new int[n];
            for (int i = 0; i < n; i++) {
                while (tab[i] % 2 == 0) {
                    tab[i] /= 2;
                    two[i]++;
                }
                while (tab[i] % 5 == 0) {
                    tab[i] /= 5;
                    five[i]++;
                }
            }

            int[][][] dp = new int[2][k + 2][26 * n + 10];
            boolean[][][] existe = new boolean[n + 1][k + 2][26 * n + 10];
            existe[0][0][0] = true;
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < k + 1; j++) {
                    for (int l = 0; l < 26 * n + 10; l++) {
                        if (existe[i][j][l]) {
                            existe[i + 1][j + 1][l + five[i]] = true;
                            existe[i + 1][j][l] = true;
                            dp[1][j + 1][l + five[i]] = Math.max(dp[1][j + 1][l + five[i]], dp[0][j][l] + two[i]);
                            dp[1][j][l] = Math.max(dp[1][j][l], dp[0][j][l]);
                        }
                    }
                    for (int l = 0; l < 26 * n + 10; l++) {
                        dp[0][j][l] = dp[1][j][l];
                        dp[1][j][l] = 0;
                    }
                }
            }
            int ans = 0;
            for (int i = 0; i < 26 * n + 10; i++) {
                ans = Math.max(ans, Math.min(dp[0][k][i], i));
            }
            out.println(ans);
        }

    }

    static class inputClass {
        BufferedReader br;
        StringTokenizer st;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

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

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

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

    }
}

