#include <bits/stdc++.h>
using namespace std;
long long num[110], n, k;
long long m, tar, a[120];
long long dv(long long a, long long b) { return (a + b - 1) / b; }
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) cin >> a[i], m = max(m, a[i]);
  for (long long i = m; i >= 0;) {
    long long tar = 0, nsum = 0;
    for (int j = 1; j <= n; ++j) {
      long long b = dv(a[j], i);
      tar = max(tar, dv(a[j], b));
    }
    for (int j = 1; j <= n; ++j) nsum += 1ll * tar * dv(a[j], tar) - a[j];
    if (nsum <= k) {
      long long ncnt = 0;
      for (int j = 1; j <= n; ++j) ncnt += dv(a[j], tar);
      tar += (k - nsum) / ncnt;
      return cout << tar, 0;
    }
    i = tar - 1;
  }
  return 0;
}
