#include <bits/stdc++.h>
const long long mx = 1e18;
int n, a[105];
long long k, ans;
int main() {
  scanf("%d%lld", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), k = k + a[i];
  for (long long l = 1, r; l <= mx; l = r + 1) {
    long long sum = n;
    r = mx;
    for (int i = 1; i <= n; i++) {
      if (a[i] <= l) continue;
      int t = (a[i] - 1) / l;
      sum = sum + t;
      r = std::min(r, 1ll * (a[i] - 1) / t);
    }
    long long lim = k / sum;
    if (lim >= l) ans = std::max(ans, std::min(lim, r));
  }
  printf("%lld\n", ans);
}
