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 mod = 1e9 + 7;
const long long MAX = INT_MAX;
const long long inf = 1e18 + 5;
const double pi = 3.14159265358979323846;
long long dirX[] = {1, -1, 0, 0};
long long dirY[] = {0, 0, 1, -1};
using namespace std;
int32_t main() {
  long long n;
  cin >> n;
  long long k;
  cin >> k;
  long long A[n];
  long long pow2[n];
  long long pow5[n];
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    cin >> A[i];
    long long count = 0;
    long long temp = A[i];
    while (temp % 2 == 0) {
      temp /= 2;
      count++;
    }
    pow2[i] = count;
    temp = A[i];
    count = 0;
    while (temp % 5 == 0) {
      temp /= 5;
      count++;
    }
    pow5[i] = count;
    sum += count;
  }
  long long dp[k + 1][sum + 1];
  for (long long j = 0; j <= k; j++)
    for (long long ki = 0; ki <= sum; ki++) dp[j][ki] = -1;
  dp[0][0] = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = k - 1; j >= 0; j--) {
      for (long long ki = 0; ki <= sum; ki++) {
        if (dp[j][ki] >= 0) {
          dp[j + 1][ki + pow5[i]] =
              max(dp[j][ki] + pow2[i], dp[j + 1][ki + pow5[i]]);
        }
      }
    }
  }
  long long ans = 0;
  for (long long i = 0; i <= sum; i++) {
    ans = max(ans, min(i, dp[k][i]));
  }
  cout << ans << "\n";
  return 0;
}
