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 Main
{
	
	private void solve()throws Exception
	{
		int n=nextInt();
		int s=nextInt();
		int two[]=new int[n+1];
		int five[]=new int[n+1];
		int tot=0;
		for(int i=1;i<=n;i++)
		{
			long a=nextLong();
			while(a%2==0)
			{
				two[i]++;
				a=a/2;
			}
			while(a%5==0)
			{
				five[i]++;
				tot++;
				a=a/5;
			}
		}
		//dp[i][j][k] is the max number of powers of 2 in a subset of j integers from the first i integers such that the sum of powers of 2 in them are k
		int dp[][][]=new int[2][s+1][tot+1];
		for(int i=0;i<=s;i++)
			for(int j=0;j<=tot;j++)
				dp[0][i][j]=-1;
		dp[0][0][0]=0;
		int p=1;
		for(int i=1;i<=n;i++,p=1-p)
			for(int j=0;j<=s;j++)
				for(int k=0;k<=tot;k++)
				{
					dp[p][j][k]=dp[1-p][j][k];
					if(j>0 && k-five[i]>=0 && dp[1-p][j-1][k-five[i]]!=-1)
						dp[p][j][k]=Math.max(dp[p][j][k],dp[1-p][j-1][k-five[i]]+two[i]);
				}
		p=1-p;
		int ans=0;
		for(int i=0;i<=tot;i++)
			ans=Math.max(ans,Math.min(i,dp[p][s][i]));
		out.println(ans);
	}

	 
	///////////////////////////////////////////////////////////

	public void run()throws Exception
	{
		br=new BufferedReader(new InputStreamReader(System.in));
		st=null;
		out=new PrintWriter(System.out);

		solve();
		
		br.close();
		out.close();
	}
	public static void main(String args[])throws Exception{
		new Main().run();
	}
	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	String nextToken()throws Exception{
		while(st==null || !st.hasMoreTokens())
		st=new StringTokenizer(br.readLine());
		return st.nextToken();
	}
	String nextLine()throws Exception{
		return br.readLine();
	}
	int nextInt()throws Exception{
		return Integer.parseInt(nextToken());
	}
	long nextLong()throws Exception{
		return Long.parseLong(nextToken());
	}
	double nextDouble()throws Exception{
		return Double.parseDouble(nextToken());
	}
}