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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * Built using CHelper plug-in Actual solution is at the top
 */
public class Main {

	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskC {

		public void solve(int testNumber, InputReader in, PrintWriter out) {
			int n = in.nextInt();
			int k = in.nextInt();

			int[] a2 = new int[n], a5 = new int[n];

			for (int i = 0; i < n; i++) {
				long currentNum = in.nextLong();
				while (currentNum % 2 == 0) {
					a2[i]++;
					currentNum /= 2;
				}

				while (currentNum % 5 == 0) {
					a5[i]++;
					currentNum /= 5;
				}
			}
			int[][] dp = new int[k + 1][25 * k + 1];
			for (int i = 0; i <= k; i++) {
				for (int j = 0; j < dp[i].length; j++) {
					dp[i][j] = -1;
				}
			}
			dp[0][0] = 0;

			for (int i = 0; i < n; i++) {
				int ai2 = a2[i], ai5 = a5[i];
				for (int j = k - 1; j >= 0; j--) {
					for (int num5 = 0; num5 < dp[j].length; num5++) {
						if (dp[j][num5] != -1) {
							dp[j + 1][num5 + ai5] = Math.max(dp[j + 1][num5 + ai5], dp[j][num5] + ai2);
						}
					}
				}
			}

			int max = 0;

			for (int i = dp[k].length - 1; i >= 0; i--) {
				max = Math.max(max, Math.min(i, dp[k][i]));
			}

			out.println(max);
		}
	}

	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

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

		public double nextFloat() {
			return Double.parseDouble(next());
		}

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

	}
}
