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.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.InputStream;

/**
 * @author khokharnikunj8
 */

public class Main {
    public static void main(String[] args) {
        new Thread(null, new Runnable() {
            public void run() {
                new Main().solve();
            }
        }, "1", 1 << 26).start();
    }

    void solve() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        ScanReader in = new ScanReader(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, ScanReader in, PrintWriter out) {
            int n = in.scanInt();
            int k = in.scanInt();
            long[] ar = new long[n + 1];
            int[] ct_2 = new int[n + 1];
            int[] ct_5 = new int[n + 1];
            for (int i = 1; i <= n; i++) {
                ar[i] = in.scanLong();
                int t2 = 0;
                while (ar[i] % 2 == 0) {
                    t2++;
                    ar[i] /= 2;
                }
                int t5 = 0;
                while (ar[i] % 5 == 0) {
                    t5++;
                    ar[i] /= 5;
                }
                ct_2[i] = t2;
                ct_5[i] = t5;
            }
            int[][] dp = new int[k + 1][200 * 26 + 1];
            for (int j = 0; j <= k; j++) {
                for (int l = 0; l < 200 * 26 + 1; l++) {
                    dp[j][l] = -1000000000;
                }
            }
            dp[0][0] = 0;
            for (int i = 1; i <= n; i++) {
                for (int j = k; j >= 0; j--) {
                    for (int l = 200 * 26; l >= 0; l--) {
                        if (j != k && l + ct_5[i] < 200 * 26 + 1)
                            dp[j + 1][l + ct_5[i]] = Math.max(dp[j + 1][l + ct_5[i]], dp[j][l] + ct_2[i]);
                    }
                }
            }
            int ans = 0;
            for (int i = 0; i < 200 * 26 + 1; i++) ans = Math.max(ans, Math.min(i, dp[k][i]));
            out.println(ans);

        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int index;
        private BufferedInputStream in;
        private int total;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (index >= total) {
                index = 0;
                try {
                    total = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (total <= 0) return -1;
            }
            return buf[index++];
        }

        public int scanInt() {
            int integer = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                }
            }
            return neg * integer;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

        public long scanLong() {
            long integer = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                }
            }
            return neg * integer;
        }

    }
}

