#include <bits/stdc++.h>
using namespace std;
const int maxn = 100;
int n;
long long ai[maxn + 2], lim;
inline long long Ceil(long long a, long long b) {
  if (a % b) return a / b + 1;
  return a / b;
}
long long FindNext(long long a, long long d) {
  if (a < d) return lim;
  long long now = Ceil(a, d), res;
  if (a % d == 0)
    res = d;
  else {
    res = a / (a / d);
    if (a % (res + 1) == 0) ++res;
  }
  return res;
}
int main() {
  scanf("%d%lld", &n, &lim);
  for (int i = 1; i <= n; ++i) scanf("%lld", ai + i), lim += ai[i];
  long long ans = 0;
  for (long long d = 1, nex = 0; d <= lim; d = nex + 1) {
    long long sum = 0;
    nex = lim;
    for (int i = 1; i <= n; ++i) {
      sum += Ceil(ai[i], d);
      nex = min(nex, FindNext(ai[i], d));
    }
    long long l = d, r = nex, mid;
    while (l <= r) {
      mid = (l + r) >> 1;
      if (mid * sum <= lim)
        ans = mid, l = mid + 1;
      else
        r = mid - 1;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
