#include <bits/stdc++.h>
using namespace std;
const long long N = 110;
long long n, k, a[N], s, Max, ans;
signed main() {
  scanf("%lld%lld", &n, &k);
  k += n;
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    --a[i];
    k += a[i];
    Max = max(Max, a[i]);
  }
  sort(a + 1, a + 1 + n);
  for (long long l = 1, r; l <= Max; l = r + 1) {
    r = 1e18, s = 0;
    long long posi = lower_bound(a + 1, a + 1 + n, l) - a;
    for (; posi <= n; posi++) {
      s += a[posi] / l;
      r = min(r, a[posi] / (a[posi] / l));
    }
    long long tmp = k / (s + n);
    if (l <= tmp) ans = max(ans, min(tmp, r));
  }
  if (Max < k / n) ans = max(ans, k / n);
  printf("%lld", ans);
  return 0;
}
