#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
int n, a[MAXN], last[MAXN];
long long int k;
vector<pair<long long int, int> > num;
vector<int> val[MAXN];
int main() {
  int i, j, border;
  long long int sum = 0LL, ans = 0LL;
  cin >> n >> k;
  for (i = 1; i <= n; ++i) {
    cin >> a[i];
    k += a[i], sum += a[i];
    for (j = 1; j < a[i]; j = border + 1) {
      val[i].push_back((a[i] + j - 1) / j);
      border = (a[i] - 1) / (val[i].back() - 1);
      num.push_back(pair<long long int, int>(border + 1, i));
    }
    val[i].push_back(1);
  }
  sort(num.begin(), num.end());
  num.push_back(pair<long long int, int>(1e13 + 1, 0));
  if (sum <= k) ans = min(k / sum, num[0].first - 1);
  for (i = 0; i < int(num.size()) - 1; i = j) {
    for (j = i; num[j].first == num[i].first; ++j) {
      sum -= val[num[j].second][last[num[j].second]];
      sum += val[num[j].second][++last[num[j].second]];
    }
    if (sum * num[i].first > k) continue;
    ans = max(ans, min(k / sum, num[j].first - 1));
  }
  cout << ans << endl;
  return 0;
}
