#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int n;
long long k, ans, sum, m;
long long a[N];
vector<long long> v;
int main() {
  scanf("%d%I64d", &n, &k);
  for (int i = 1; i <= n; ++i)
    scanf("%I64d", &a[i]), sum += a[i], m = max(m, a[i]);
  long long tot = k + m;
  for (int i = 1; i <= n; ++i) {
    long long j, t;
    for (j = 1, t = 0; j < a[i] && t < a[i]; j = t + 1)
      v.push_back(j), t = (a[i] - 1) / ((a[i] - 1) / j);
    v.push_back(j);
  }
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  v.push_back(100000000000000ll);
  for (int i = v.size() - 1; i >= 0; --i) {
    long long x = v[i];
    long long tot = 0;
    for (int j = 1; j <= n; ++j) tot += (a[j] - 1) / x;
    if (x * tot <= k + sum - (long long)n * x) {
      long long l = x - 1, r = v[i + 1];
      while (r - l > 1ll) {
        long long mid = (l + r) >> 1ll;
        if (mid * tot <= k + sum - (long long)n * mid)
          l = ans = mid;
        else
          r = mid;
      }
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
