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

public class roundness {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken()); // # of integers
		int k = Integer.parseInt(st.nextToken()); // # of integers chosen
		
		long[] A = new long[n+1];
		st = new StringTokenizer(br.readLine());
		for(int j=1; j<=n; j++)
			A[j] = Long.parseLong(st.nextToken());
		
		int[] p2 = new int[n+1];
		int[] p5 = new int[n+1];
		int p5Total = 0;
		for(int j=1; j<=n; j++) {
			long x = A[j];
			while(x>0 && x%2==0) {
				x = x/2;
				p2[j]++;
			}
			while(x>0 && x%5==0) {
				x = x/5;
				p5[j]++;
			}
			p5Total += p5[j];
		}

		int[][] dp = new int[n+1][p5Total+1];
		for(int j=0; j<=n; j++) {Arrays.fill(dp[j], -1); dp[j][0] = 0;}
		
		// dp[i][j][l]=the max sum of powers of 2 while working with the first
		// i integers, and taking j of them so that the sum of powers of 5 is l
		
		// i==1, j==1, l==p5[1]
		dp[1][p5[1]] = p2[1];
		
		// update dp[][][]
		for(int i=2; i<=n; i++) {
			// dp: for i-1;  dp2: for i
			int[][] dp2 = new int[n+1][p5Total+1];
			for(int j=0; j<=n; j++) {Arrays.fill(dp2[j], -1); dp2[j][0] = 0;}
			
			for(int j=1; j<=Math.min(i, k); j++) {
				for(int l=0; l<=p5Total; l++) {
					if(l+p5[i]<=p5Total && dp[j-1][l]!=-1)
						dp2[j][l+p5[i]] = Math.max(dp2[j][l+p5[i]], dp[j-1][l]+p2[i]);

//					if(l>=p5[i] && dp[j-1][l-p5[i]]!=-1)
//						dp2[j][l] = Math.max(dp2[j][l], dp[j-1][l-p5[i]]+p2[i]);
					
					dp2[j][l] = Math.max(dp2[j][l], dp[j][l]);
				}
			}
			dp = dp2;
		}
		
		int max = 0;
		for(int l=1; l<=p5Total; l++) {
			max = Math.max(max, Math.min(l, dp[k][l]));
		}
		System.out.println(max);
		br.close();
	}
}