#include <bits/stdc++.h>
using namespace std;
const long long M = 105;
long long read() {
  long long x = 0, flag = 1;
  char c;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') flag = -1;
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
  return x * flag;
}
long long n, k, mx, ans, a[M];
signed main() {
  n = read();
  k = read();
  for (long long i = 1; i <= n; i++) {
    mx = max(mx, a[i] = read());
    k += a[i];
    a[i]--;
  }
  for (long long l = 1, r, s; l <= mx; l = r + 1) {
    r = 1e18;
    s = n;
    for (long long j = 1; j <= n; j++)
      if (a[j] >= l) {
        s += a[j] / l;
        r = min(r, a[j] / (a[j] / l));
      }
    long long tmp = k / s;
    if (l <= tmp) ans = max(ans, min(tmp, r));
  }
  if (ans < n / k) ans = n / k;
  printf("%lld\n", ans);
}
