#include <bits/stdc++.h>
using namespace std;
inline void R(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
inline void R(long long &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
void Redirect() {
  freopen(".in", "r", stdin);
  freopen(".out", "w", stdout);
}
long long n, k;
int a[105];
int p[int(1e7) + 10];
int cnt = 0;
long long C = 0;
int main() {
  R(n);
  R(k);
  for (int i = 1; i <= n; i += 1) {
    R(a[i]);
    C += a[i];
    for (int j = 1; j * j <= a[i]; ++j) {
      p[++cnt] = j;
      p[++cnt] = (a[i] + j - 1) / j;
    }
  }
  C += k;
  long long ans = 0;
  sort(p, p + cnt + 1);
  cnt = unique(p, p + cnt + 1) - p - 1;
  for (int i = 1; i <= cnt; ++i) {
    long long d = p[i];
    long long cur = 0;
    for (int j = 1; j <= n; j += 1) {
      cur += (a[j] + (d - 1)) / d;
    }
    if (cur <= (1.0 * C / d)) {
      ans = max(ans, C / cur);
    }
  }
  cout << ans << endl;
}
