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.
/*
Keep solving problems.
*/

import java.util.*;
import java.io.*;

public class CFA {
    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000 * 1000 * 1000 + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    void solve() throws IOException {
        int n = nextInt();
        int k = nextInt();
        long[] arr = nextLongArr(n);
        int[] two = new int[n];
        int[] five = new int[n];
        for (int i = 0; i < n; i++) {
            long val = arr[i];
            int cnt = 0;
            while (val % 2 == 0) {
                cnt++;
                val = val / 2;
            }
            two[i] = cnt;
            cnt = 0;
            while (val % 5 == 0) {
                cnt++;
                val = val / 5;
            }
            five[i] = cnt;
        }

        int m1 = 27;
        int limit = 201;
        int sz = limit * m1 + 1;
        int[][] dp0 = new int[1 + k][sz];
        int[][] dp1 = new int[1 + k][sz];
        for (int i = 0; i <= k; i++) {
            Arrays.fill(dp0[i], -1);
        }
        dp0[0][0] = 0;
        for (int i = 0; i < n; i++) {

            for (int j = 0; j <= k; j++) {
                Arrays.fill(dp1[j], -1);
            }

            for (int j = 0; j <= k; j++) {
                for (int p = 0; p < sz; p++) {
                    if (dp0[j][p] != -1) {
                        dp1[j][p] = Math.max(dp1[j][p], dp0[j][p]);
                        if (j + 1 <= k && p + five[i] < sz) {
                            dp1[j + 1][p + five[i]] = Math.max(dp1[j + 1][p + five[i]], dp0[j][p] + two[i]);
                        }
                    }
                }
            }

            for (int j = 0; j <= k; j++) {
                for (int p = 0; p < sz; p++) {
                    dp0[j][p] = dp1[j][p];
                }
            }
        }


        int res = 0;
        for (int i = 0; i < sz; i++) {
            res = Math.max(res, Math.min(i, dp0[k][i]));
        }

        outln(res);
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }

    long gcd(long a, long b) {
        while(a != 0 && b != 0) {
            long c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }

    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        System.out.format("%.9f%n", val);
    }
    public CFA() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFA();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}

