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.
#include <bits/stdc++.h>
const long long maxn = 200 + 10;
long long N, K, f[maxn][6000], arr[maxn], num2[maxn], num5[maxn];
inline long long Max(long long a, long long b) { return a > b ? a : b; }
inline long long Min(long long a, long long b) { return a > b ? b : a; }
inline long long read() {
  long long f = 1, r = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') {
      f = -1;
    }
    c = getchar();
  }
  while (isdigit(c)) {
    r = 10 * r + c - '0';
    c = getchar();
  }
  return f * r;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writesp(long long x) { write(x), putchar(' '); }
inline void writeln(long long x) { write(x), puts(""); }
signed main() {
  N = read(), K = read();
  for (register long long i = 1; i <= N; ++i) {
    long long x = read();
    long long tmp = x;
    while (tmp % 2 == 0 && tmp != 0) {
      num2[i]++, tmp /= 2;
    }
    tmp = x;
    while (tmp % 5 == 0 && tmp != 0) {
      num5[i]++, tmp /= 5;
    }
    arr[i] = arr[i - 1] + num5[i];
  }
  memset(f, ~0x3f, sizeof(f));
  f[0][0] = 0;
  for (long long i = 1; i <= N; ++i) {
    for (long long j = Min(i, K); j >= 1; --j) {
      for (long long k = arr[i]; k >= num5[i]; --k) {
        f[j][k] = Max(f[j][k], f[j - 1][k - num5[i]] + num2[i]);
      }
    }
  }
  long long ans = 0;
  for (long long j = arr[N]; j >= 0; j--) {
    if (f[K][j] > 0) ans = Max(ans, Min(j, f[K][j]));
  }
  writeln(ans);
  return 0;
}
