#include <bits/stdc++.h>
using namespace std;
const int N = 105;
long long n, k, Max, ans, a[N];
int main() {
  scanf("%lld%lld", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    Max = max(Max, a[i]);
    k += a[i];
    a[i]--;
  }
  for (long long l = 1, r, sum; l <= Max; l = r + 1) {
    r = 1e18;
    sum = n;
    for (int j = 1; j <= n; j++)
      if (a[j] >= l) {
        sum += a[j] / l;
        r = min(r, a[j] / (a[j] / l));
      }
    long long x = k / sum;
    if (l <= x) ans = max(ans, min(x, r));
  }
  if (ans < n / k) ans = n / k;
  printf("%lld", ans);
  return 0;
}
