#include <bits/stdc++.h>
inline long long min(const long long x, const long long y) {
  return x < y ? x : y;
}
inline long long max(const long long x, const long long y) {
  return x > y ? x : y;
}
long long a[105];
signed main() {
  long long n, k, mx = 0, ans = 0;
  scanf("%lld%lld", &n, &k);
  for (long long i = 1; i <= n; ++i)
    scanf("%d", a + i), k += a[i], mx = max(mx, --a[i]);
  for (long long l = 1, r; l <= mx; l = r + 1) {
    r = 1e18;
    long long s = 0;
    for (long long i = 1; i <= n; ++i)
      if (l <= a[i]) r = min(r, a[i] / (a[i] / l)), s += a[i] / l;
    if (l <= k / (n + s)) ans = max(ans, min(k / (n + s), r));
  }
  if (mx < k / n) ans = max(ans, k / n);
  printf("%lld", ans);
  return 0;
}
