#include <bits/stdc++.h>
long long C[103];
int N;
long long cal(long long a) {
  long long ans = 0;
  for (int i = 0; i < N; i++) ans += ((C[i] - 1) / a + 1) * a - C[i];
  return ans;
}
long long nxt(long long t) {
  long long ans = 1000000000000ll;
  for (int i = 0; i < N; i++)
    if (C[i] >= t) ans = std::min(ans, (C[i] - 1) / (C[i] / t) + 1);
  return ans;
}
int main() {
  long long ans = 0, K;
  scanf("%d%lld", &N, &K);
  for (int i = 0; i < N; i++) scanf("%lld", C + i);
  std::sort(C, C + N);
  long long now = 1;
  for (;; now = nxt(now + 1)) {
    if (cal(now) <= K) ans = now;
    if (now == C[N - 1]) break;
  }
  long long T = 0;
  for (int i = 0; i < N; i++) T += (C[i] - 1) / ans + 1;
  printf("%lld\n", ans + (K - cal(ans)) / T);
}
