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>
using namespace std;
template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= 1000000007;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
  }
  return res;
}
long long min(long long a, long long b) {
  if (a > b) return b;
  return a;
}
long long fun2(long long x) {
  long long tot = 0;
  while (x % 2 == 0 && x > 0) x /= 2, tot++;
  return tot;
}
long long fun5(long long x) {
  long long tot = 0;
  while (x % 5 == 0 && x > 0) x /= 5, tot++;
  return tot;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  long long n, k;
  cin >> n >> k;
  long long cnt[n][2], a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[i][0] = fun2(a[i]);
    cnt[i][1] = fun5(a[i]);
  }
  long long dp[k + 1][(n + 1) * 31];
  memset(dp, -1, sizeof(dp));
  for (int i = 0; i < n + 1; i++) dp[0][0] = 0;
  for (int i = 0; i < n; i++) {
    for (int l = k - 1; l >= 0; l--) {
      for (int j = 0; j < n * 31; j++) {
        if (dp[l][j] == -1) continue;
        amax(dp[l + 1][j + cnt[i][1]], dp[l][j] + cnt[i][0]);
      }
    }
  }
  long long ans = 0;
  for (int i = 0; i < n * 31; i++) {
    if (dp[k][i] != -1) {
      ans = max(ans, min(i, dp[k][i]));
    }
  }
  cout << ans;
  return 0;
}
