#include <bits/stdc++.h>
namespace IO {
char buf[1 << 20 | 1], *f1 = buf, *f2 = buf, pbuf[1 << 24 | 1], *f3 = pbuf,
                       sta[100];
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
template <class T>
inline void write(T x) {
  if (!x) return (void)(*f3++ = 48, *f3++ = ' ');
  if (x < 0) *f3++ = '-', x = ~x + 1;
  char *top = sta;
  while (x) *top++ = x % 10 + 48, x /= 10;
  while (top != sta) *f3++ = *--top;
  *f3++ = ' ';
}
inline void put(std::string s) {
  int len = s.length();
  for (int i = 0; i < len; i++) *f3++ = s[i];
  *f3++ = ' ';
}
inline void endline() { *f3++ = '\n'; }
template <class T>
inline T abs(T a) {
  return a < 0 ? -a : a;
}
template <class T>
inline T max(T a, T b) {
  return a > b ? a : b;
}
template <class T>
inline T min(T a, T b) {
  return a < b ? a : b;
}
template <class T>
inline void swap(T &a, T &b) {
  T t = a;
  a = b;
  b = t;
}
}  // namespace IO
using namespace IO;
long long n, k, s, mx, tmp, ans, a[105];
int main() {
  n = read();
  k = read();
  for (int i = 1; i <= n; ++i) k += (a[i] = read()), mx = max(mx, a[i] - 1);
  for (long long l = 1, r; l <= mx; l = r + 1) {
    r = 1e18;
    s = 0;
    for (int i = 1; i <= n; ++i)
      if (a[i] - 1 >= l) {
        s += (a[i] - 1) / l;
        r = min(r, (a[i] - 1) / ((a[i] - 1) / l));
      }
    tmp = k / (s + n);
    if (l <= tmp) ans = max(ans, min(tmp, r));
  }
  if (mx < k / n) ans = max(ans, k / n);
  printf("%lld\n", ans);
  return 0;
}
