#include <bits/stdc++.h>
using namespace std;
template <class X, class Y>
void amax(X& x, const Y& y) {
  if (x < y) x = y;
}
template <class X, class Y>
void amin(X& x, const Y& y) {
  if (x > y) x = y;
}
const int INF = 1e9 + 10;
const long long INFL = 1e18 + 10;
const int MAX = 110;
int n;
long long k, sa, C;
int a[MAX], maxa;
vector<pair<int, int> > s;
void push(int l, int r) {
  s.push_back(make_pair(l, 0));
  s.push_back(make_pair(r, 1));
}
void process() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) sa += a[i];
  maxa = a[n];
  C = k + sa;
  long long d = C / n;
  if (d >= maxa) {
    cout << d;
    return;
  }
  for (int i = 1; i <= n; i++) {
    int ls = a[i];
    push(ls, maxa);
    while (ls != 1) {
      int t = a[i] / (ls - 1);
      int nls = a[i] / (t + 1) + 1;
      push(nls, ls - 1);
      ls = nls;
    }
  }
  sort(s.begin(), s.end());
  s.resize(distance(s.begin(), unique(s.begin(), s.end())));
  int i = s.size() - 1;
  while (i > 0) {
    int j = i - 1;
    while (j >= 0 && s[j].second == 1) j--;
    if (j < 0) break;
    long long sum = 0;
    bool check = true;
    for (int l = 1; l <= n; l++) {
      sum += (a[l] - 1) / s[j].first + 1;
      if (sum * s[j].first > C) {
        check = false;
        break;
      }
    }
    if (!check) {
      i = j - 1;
      while (i >= 0 && s[i].second == 0) i--;
      continue;
    }
    long long d = C / sum;
    cout << min(d, (long long)s[i].first);
    return;
  }
  cout << 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  process();
}
