#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
long long k;
int n, a[105];
int dis(int d, int x) { return x % d ? d - x % d : 0; }
long long cal(int d) {
  long long res = 0;
  for (int i = 1; i <= n; ++i) {
    res += (a[i] + d - 1) / d;
  }
  return res;
}
vector<int> l;
set<int> sl;
long long ans = 0;
int main() {
  scanf("%d%I64d", &n, &k);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), k += a[i];
  for (int i = 1; i <= n; ++i) {
    --a[i];
    int tmi = sqrt(a[i] + 0.5);
    for (int j = 1; j <= tmi; ++j) sl.insert(a[i] / j);
    for (int j = 1; tmi && j < a[i] / tmi; ++j) sl.insert(j);
    sl.insert(++a[i]);
  }
  l.push_back(0);
  for (set<int>::iterator it = sl.begin(); it != sl.end(); ++it)
    l.push_back(*it);
  for (vector<int>::iterator it = l.begin() + 1; it != l.end(); ++it) {
    int l0 = *(it - 1), r0 = *it;
    long long tc = cal(r0);
    if (k / tc > l0) ans = max(ans, k / tc);
  }
  printf("%I64d", ans);
  return 0;
}
