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 D implements Runnable{
	public static void main (String[] args) {new Thread(null, new D(), "_cf", 1 << 28).start();}

	public void run() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("Go!");

		int n = fs.nextInt();
		int k = fs.nextInt();
		int[][] a = new int[n][];
		for(int i = 0; i < n; i++) {
			a[i] = calc(fs.nextLong());
		}
		int MAX = 5001;
		int oo = (int)1e6;
		int[][] dp = new int[k+1][MAX];
		for(int[] d : dp)
			Arrays.fill(d, -oo);
		dp[k][0] = 0;
		for(int i = 0; i < n; i++) {
			int[][] ndp = new int[k+1][MAX];
			for(int[] d : ndp) Arrays.fill(d, -oo);
			for(int kLeft = k; kLeft >= 0; kLeft--) {
				for(int num5 = 0; num5 < MAX; num5++) {
					if(dp[kLeft][num5] == -oo) continue;
					ndp[kLeft][num5] = Math.max(ndp[kLeft][num5], dp[kLeft][num5]);
					if(kLeft > 0) {
						int nk = kLeft-1;
						int n5 = num5 + a[i][1];
						ndp[nk][n5] = Math.max(ndp[nk][n5], dp[kLeft][num5] + a[i][0]);
					}
					else {
						ndp[kLeft][num5] = Math.max(ndp[kLeft][num5], dp[kLeft][num5]);
					}
				}
			}
			dp = ndp;
		}
		int res = 0;
		for(int i = 0; i < MAX; i++) {
			for(int kk = 0; kk <= k; kk++) {
				res = Math.max(res, Math.min(i, dp[kk][i]));
			}
		}
		out.println(res);
		out.close();
	}
	
	int[] calc(long n) {
		int[] res = new int[2];
		while(n % 2 == 0) {
			res[0]++;
			n /= 2;
		}
		while(n % 5 == 0) {
			res[1]++;
			n /= 5;
		}
		return res;
	}

	void sort (int[] a) {
		int n = a.length;
		for(int i = 0; i < 50; i++) {
			Random r = new Random();
			int x = r.nextInt(n), y = r.nextInt(n);
			int temp = a[x];
			a[x] = a[y];
			a[y] = temp;
		}
		Arrays.sort(a);
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

}