#include <bits/stdc++.h>
using namespace std;
int n, a[110];
long long k, ans = 0;
int main() {
  scanf("%d%lld", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (long long l = 1, r; l <= 1LL << 62; l = r + 1) {
    long long cnt = 0, weight = 0;
    r = 1LL << 62;
    for (int i = 1; i <= n; i++) {
      cnt += (((a[i] - 1) / l) + 1) * l - a[i];
      weight += (a[i] - 1) / l + 1;
      if ((a[i] > l) && ((a[i] - 1) / ((a[i] - 1) / l) < r))
        r = (a[i] - 1) / ((a[i] - 1) / l);
    }
    if (k >= cnt) {
      long long nex = (k - cnt) / weight;
      ans = max(ans, min(l + nex, r));
    }
  }
  printf("%lld\n", ans);
}
