#include <bits/stdc++.h>
using namespace std;
int n;
long long a[105], mn;
int main() {
  cin >> n >> mn;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long ans = 0;
  for (int i = 1; i <= 400000; i++) {
    long long sum = 0;
    for (int j = 0; j < n; j++) {
      long long x = (a[j] + i - 1) / i;
      x *= i;
      sum += x - a[j];
    }
    if (sum <= mn) ans = i;
  }
  vector<long long> cand;
  for (int j = 0; j < n; j++) {
    for (int i = 2505; i >= 1; i--) {
      long long val = (a[j] + i - 1) / i;
      cand.push_back(val);
    }
  }
  sort(cand.begin(), cand.end());
  cand.erase(unique(cand.begin(), cand.end()), cand.end());
  for (int i = 0; i < cand.size(); i++) {
    long long lb = cand[i] - 1,
              ub = (i == cand.size() - 1 ? 1e13 : cand[i + 1]);
    while (ub - lb > 1) {
      long long mid = (lb + ub) / 2;
      long long sum = 0;
      for (int j = 0; j < n; j++) {
        long long x = (a[j] + mid - 1) / mid;
        x *= mid;
        sum += x - a[j];
      }
      if (sum <= mn)
        lb = mid;
      else
        ub = mid;
    }
    if (lb == cand[i] - 1) continue;
    ans = max(ans, lb);
  }
  cout << ans << endl;
}
