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 Main2 {
	
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(in.readLine());
		
		int n = Integer.parseInt(st.nextToken());
		int k = Integer.parseInt(st.nextToken());
		
		State[] nums = new State[n]; // number of 2s and 5s each contains
		st = new StringTokenizer(in.readLine());

		int sum2 = 0;
		int sum5 = 0;
		
		for(int i = 0; i < n; i ++) {
			long num = Long.parseLong(st.nextToken());
			int tmp1 = count2(num);
			int tmp2 = count5(num);
			
			sum2 += tmp1;
			sum5 += tmp2;
			
			nums[i] = new State(tmp1, tmp2);
		}
		
		
		
		int[][] dp2 = new int[k+1][sum2+1];
		int[][] dp5 = new int[k+1][sum5+1];
		
		for(int i = 0; i <= k; i ++) {
			Arrays.fill(dp2[i], -1);
			Arrays.fill(dp5[i], -1);
		}
		
		dp2[0][0] = 0;
		
		for(int i = 0; i < n; i ++) { // loop through the elements
			
			for(int j = k-1; j >= 0; j --) {
				for(int l = 0; l <= sum2; l ++) {
					if(dp2[j][l] != -1) {
						int num2 = l + nums[i].num2;
						int num5 = nums[i].num5;
						
						int diff = Math.abs(num2 - num5);
						
						if(num5 > num2) {
							dp5[j+1][diff] = Math.max(dp5[j+1][diff], dp2[j][l] + num2);
						}
						else {
							dp2[j+1][diff] = Math.max(dp2[j+1][diff], dp2[j][l] + num5);
						}
					}
				}
				for(int l = 1; l <= sum5; l ++) {
					if(dp5[j][l] != -1) {
						int num2 = nums[i].num2;
						int num5 = l + nums[i].num5;
						
						int diff = Math.abs(num2 - num5);
						
						if(num5 > num2) {
							dp5[j+1][diff] = Math.max(dp5[j+1][diff], dp5[j][l] + num2);
						}
						else {
							dp2[j+1][diff] = Math.max(dp2[j+1][diff], dp5[j][l] + num5);
						}
					}
				}
			}
		}
		
		
		// the answer is the max of the Ks
		int max = 0;
		for(int i = 0; i <= sum2; i ++) {
			max = Math.max(max, dp2[k][i]);
		}
		for(int i = 1; i <= sum5; i ++) {
			max = Math.max(max, dp5[k][i]);
		}
		
		System.out.println(max);
		in.close();
	}
	
	public static int count2(long num) {
		int count = 0;
		while(num % 2 == 0) {
			count ++;
			num /= 2;
		}
		return count;
	}
	
	public static int count5(long num) {
		int count = 0;
		while(num % 5 == 0) {
			count ++;
			num /= 5;
		}
		return count;
	}
	
	static class State{
		int num2, num5;
		public State(int num2, int num5) {
			this.num2 = num2;
			this.num5 = num5;
		}
	}
}