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.util.*;

import static java.lang.Math.*;

public class Main
{
    public static int pos = 0;

    public static long read(String s)
    {
        long x = 0;

        while (s.charAt(pos) >= '0' && s.charAt(pos) <= '9') {

            x = x * 10 + s.charAt(pos) - 48;

            pos++;

        }

        pos++;

        return x;
    }

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);

        int n = in.nextInt();
        int k = in.nextInt();

        in.nextLine();

        String line = in.nextLine();

        line = line + " ";

        long[] t = new long[n + 1];

        for (int i = 1; i <= n; i++) t[i] = read(line);

        short[][][] dp = new short[2][k + 1][5200];

        for (int i = 0; i <= k; i++)
            for (int j = 0; j <= 5199; j++)
                dp[0][i][j] = -1;

        dp[0][0][0] = 0;

        int l = 1;

        for (int i = 1; i <= n; i++) {

            long x = t[i];

            int nr2 = 0, nr5 = 0;

            while (x > 0 && x % 2 == 0) { nr2++; x /= 2; }
            while (x > 0 && x % 5 == 0) { nr5++; x /= 5; }

            for (int j = 0; j <= 5199; j++) dp[l][0][j] = (short)max(-1, dp[l ^ 1][0][j]);

            for (int j = 1; j <= k; j++)
                for (int p = 0; p <= 5199; p++) {

                    dp[l][j][p] = -1;

                    if (p >= nr5 && dp[l ^ 1][j - 1][p - nr5] >= 0)
                        dp[l][j][p] = (short) max(dp[l][j][p], dp[l ^ 1][j - 1][p - nr5] + nr2);

                    dp[l][j][p] = (short) max(dp[l][j][p], dp[l ^ 1][j][p]);

            }

            l = l ^ 1;
        }

        int ans = 0;

        for (int i = 0; i <= 5199; i++) ans = max(ans, min(i, dp[l ^ 1][k][i]));

        System.out.println(ans);
    }
}