#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline bool chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
inline long long read() {
  register long long c(getchar()), sum(0), fg(1);
  while (c < '0' || c > '9') {
    if (c == '-') fg = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') sum = sum * 10 + c - '0', c = getchar();
  return sum * fg;
}
const long long oo = 0x3f3f3f3f;
const long long maxn = 100;
long long a[maxn + 5];
long long N, M, K;
vector<long long> key;
int main() {
  N = read(), K = read();
  for (long long i = (1), i_end_ = (N); i <= i_end_; ++i) a[i] = read() - 1;
  key.push_back(0), key.push_back(1e12);
  for (long long _ = (1), __end_ = (N); _ <= __end_; ++_) {
    long long t;
    for (t = 1; t * t <= a[_]; ++t) key.push_back(t);
    for (long long i = a[_] / t; i; --i) key.push_back(a[_] / i);
  }
  sort((key).begin(), (key).end());
  key.erase(unique(key.begin(), key.end()), key.end());
  long long res = 1, rhs = N + K;
  for (long long i = (1), i_end_ = (N); i <= i_end_; ++i) rhs += a[i];
  for (int i = 0; i + 1 < (int((key).size())); ++i) {
    long long c = N, d = key[i] + 1;
    for (long long j = (1), j_end_ = (N); j <= j_end_; ++j) c += a[j] / d;
    long long t = rhs / c;
    if (t > key[i]) chkmax(res, min(t, key[i + 1]));
  }
  printf("%lld\n", res);
  return 0;
}
