#include <bits/stdc++.h>
using namespace std;
int n;
long long k;
long long a[105];
map<long long, bool> mp;
vector<long long> vec;
bool cmp(long long x1, long long x2) { return x1 > x2; }
long long ok(long long x) {
  long long now = 0;
  for (int i = 1; i <= n; i++) now += (a[i] + x - 1) / x;
  return k / now;
}
int main() {
  long long ans = 0, m;
  scanf("%d%lld", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", a + i);
    for (long long j = 1; (j - 1) * (j - 1) <= a[i]; j++) {
      vec.push_back(j);
      vec.push_back((a[i] + j - 1) / j);
    }
    k += a[i];
  }
  vec.push_back(m / n + 1);
  sort(vec.begin(), vec.end(), cmp);
  for (int i = 0; i < vec.size(); i++) {
    if (mp[vec[i]] == 0) {
      mp[vec[i]] = 1;
      m = ok(vec[i]);
      if (m >= vec[i]) {
        ans = m;
        break;
      }
    }
  }
  printf("%lld\n", ans);
  return 0;
}
