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.*;
import java.util.Map.Entry;
import java.lang.Math;
import java.math.BigInteger;

public class Problem {
	class Powers2_5 {
		int pow2, pow5;

		Powers2_5(int pow2, int pow5) {
			this.pow2 = pow2;
			this.pow5 = pow5;
		}
	}

	void solve() throws IOException {
		int n = rI();
		int k = rI();

		Powers2_5[] pows = new Powers2_5[n];

		int sumPow2 = 0;
		int sumPow5 = 0;

		for (int i = 0; i < n; ++i) {
			long cur = rL();

			sumPow2 += countPow(cur, 2);
			sumPow5 += countPow(cur, 5);

			pows[i] = new Powers2_5(countPow(cur, 2), countPow(cur, 5));
		}

		final int INF = -1000 * 1000 * 1000;

		int[][][] dp = new int[2][n + 1][5300];
		for (int[][] dp2 : dp) {
			for (int[] dp1 : dp2) {
				Arrays.fill(dp1, INF);
			}
		}

		dp[1][0][0] = 0;

		for (int i = 0; i < n; ++i) {
			int[][] curDp = dp[i % 2];
			int[][] prevDp = dp[1 - i % 2];

			int p2 = pows[i].pow2;
			int p5 = pows[i].pow5;

			for (int j = 0; j <= n; ++j) {
				for (int p = 0; p < 5300; ++p) {
					curDp[j][p] = prevDp[j][p];
					if (j > 0 && p >= p5) {
						curDp[j][p] = Math.max(prevDp[j][p], prevDp[j - 1][p - p5] + p2);
					}
				}
			}
		}

		int[][] ansDp = dp[1 - n % 2];
		int ans = 0;
		for (int i = 0; i < 5300; ++i) {
			ans = Math.min(i, Math.max(ans, ansDp[k][i]));
		}
		out.println(ans);

	}

	int countPow(long n, int f) {
		int count = 0;
		while (n % f == 0) {
			count++;
			n /= f;
		}
		return count;
	}

	int checkBit(int mask, int bit) {
		return (mask >> bit) & 1;
	}

	public static void main(String[] args) throws IOException {

		new Problem().run();
	}

	boolean isLower(char a) {
		return ((int) a) >= 97 ? true : false;
	}

	long INF = Integer.MAX_VALUE - 12345;

	int[][] STEPS = { { 0, 1 }, { 1, 0 }, { -1, 0 }, { 0, -1 } };

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok;
	Random rnd = new Random();
	static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

	Problem() throws FileNotFoundException {

		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
		tok = new StringTokenizer("");
	}

	long checkBit(long mask, int bit) {
		return (mask >> bit) & 1;
	}

	// ======================================================

	// ======================================================
	void run() throws IOException {
		solve();
		out.close();
	}

	char[] reverseCharArray(char[] arr) {
		char[] ans = new char[arr.length];
		for (int i = 0; i < arr.length; ++i) {
			ans[i] = arr[arr.length - i - 1];
		}
		return ans;
	}

	int sqrt(double m) {
		int l = 0;
		int r = 1000000000 + 9;
		int i = 1000;
		while (r - l > 1) {
			int mid = (r + l) / 2;
			if (mid * mid > m) {
				r = mid;
			} else {
				l = mid;
			}
		}
		return l;
	}

	int countPow(int m, int n) {
		int ans = 0;
		while (m % n == 0 && m > 0) {
			ans++;
			m /= n;
		}
		return ans;
	}

	long binPow(long a, long b) {
		if (b == 0) {
			return 1;
		}
		if (b % 2 == 1) {
			return a * binPow(a, b - 1);
		} else {
			long c = binPow(a, b / 2);
			return c * c;
		}

	}

	int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	long pow(long x, long k) {
		long ans = 1;
		for (int i = 0; i < k; ++i) {
			ans *= x;
		}
		return ans;
	}

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

	String delimiter = " ";

	String readLine() throws IOException {
		return in.readLine();
	}

	String rS() throws IOException {
		while (!tok.hasMoreTokens()) {
			String nextLine = readLine();
			if (null == nextLine)
				return null;

			tok = new StringTokenizer(nextLine);
		}

		return tok.nextToken(delimiter);
	}

	int rI() throws IOException {
		return Integer.parseInt(rS());
	}

	long rL() throws IOException {
		return Long.parseLong(rS());
	}

	double rD() throws IOException {
		return Double.parseDouble(rS());
	}

	int[] rA(int b) {
		int a[] = new int[b];
		for (int i = 0; i < b; i++) {
			try {
				a[i] = rI();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return a;
	}

	int[] readSortedIntArray(int size) throws IOException {
		Integer[] array = new Integer[size];

		for (int index = 0; index < size; ++index) {
			array[index] = rI();
		}
		Arrays.sort(array);

		int[] sortedArray = new int[size];
		for (int index = 0; index < size; ++index) {
			sortedArray[index] = array[index];
		}

		return sortedArray;
	}

	int[] sortedIntArray(int size, int[] array) throws IOException {
		for (int index = 0; index < size; ++index) {
			array[index] = rI();
		}
		Arrays.sort(array);

		int[] sortedArray = new int[size];
		for (int index = 0; index < size; ++index) {
			sortedArray[index] = array[index];
		}

		return sortedArray;
	}
}