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.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;

/**
 * Created by fengbo on 16/7/23.
 */
public class D {
    static PrintWriter out = new PrintWriter(System.out);
    static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception{
        String[] nk = reader.readLine().split(" ");
        int n = Integer.valueOf(nk[0]);
        int k = Integer.valueOf(nk[1]);

        String[] ar = reader.readLine().split(" ");
        long[] data = new long[n];
        for (int i = 0; i < n; i++) {
            data[i] = Long.valueOf(ar[i]);
        }

        int max = 6005;
        int[][] dp1 = new int[210][max];
        int[][] dp = new int[210][max];

        for (int i = 0; i < 210; i++) {
            for (int j = 0; j < max; j++) {
                dp1[i][j] = -1;
            }
        }
        dp1[0][0] = 0;
        for (int i = 0; i < n; i++) {
            int cnt2 = 0, cnt5 = 0;
            long v = data[i];
            while(v % 2 == 0) {
                v /= 2;
                cnt2++;
            }
            while (v % 5 == 0) {
                v/=5;
                cnt5 ++;
            }

//            out.println("cnt2=" + cnt2 + " , cnt5=" + cnt5);


            for (int j = 0; j <= n; j++) {
                for (int l = 0; l < max; l++) {
                    dp[j][l] = dp1[j][l];
                }
            }

//            out.println(Math.min(i,k));

            for (int j = 0; j <= Math.min(i, k); j++) {
                for (int l = 0; l < max; l++) {
                    if(l + cnt5 < max && dp1[j][l] >= 0) {
                        dp[j + 1][l + cnt5] = Math.max(dp[j + 1][l + cnt5], dp1[j][l] + cnt2);
//                        out.println("here");
                    }
                }
            }

            for (int j = 0; j <= n; j++) {
                for (int l = 0; l < max; l++) {
                    dp1[j][l] = dp[j][l];
//                    out.print(dp[j][l] + " ");
                }
//                out.println();
            }
//            out.println();
        }



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

        out.println(ans);

        out.flush();
    }
}
