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

public class E26_D {
	FastScanner in;
	PrintWriter out;

	public void solve() {
		int n = in.nextInt();
		int k = in.nextInt();
		long a[] = new long[n];
		int p2[] = new int[n];
		int p5[] = new int[n];
		int x = 0;

		for (int i = 0; i < n; i++) {
			a[i] = in.nextLong();
			p2[i] = get2(a[i]);
			p5[i] = get5(a[i]);
			x += p5[i];
		}

		int d1[][] = new int[k + 1][x + 1];
		// int d2[][] = new int[n + 1][x + 1];
		for (int tmp[] : d1) {
			Arrays.fill(tmp, Integer.MIN_VALUE);
		}
		d1[0][0] = 0;

		for (int i = 1; i <= n; i++) {
			for (int j = k; j >= 1; j--) {
				for (int q = p5[i - 1]; q <= x; q++) {
					d1[j][q] = Math.max(d1[j][q], d1[j - 1][q - p5[i - 1]] + p2[i - 1]);
					// d2[j][q] = Math.max(d2[j][q], d1[j][q]);
				}
			}
			// for (int j = 0; j <= n; j++) {
			// for (int q = 0; q <= x; q++) {
			// d1[j][q] = d2[j][q];
			// d2[j][q] = 0;
			// }
			// }
		}

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

		out.println(res);
	}

	public int get2(long x) {
		int res = 0;
		while (x % 2 == 0) {
			x /= 2;
			res++;
		}
		return res;
	}

	public int get5(long x) {
		int res = 0;
		while (x % 5 == 0) {
			x /= 5;
			res++;
		}
		return res;
	}

	public void run() {
		in = new FastScanner();
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		solve();
		out.close();
	}

	class FastScanner {
		StringTokenizer st;
		BufferedReader br;

		FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	public static void main(String[] args) {
		new E26_D().run();
	}
}
