#include <bits/stdc++.h>
using namespace std;
int n, x;
long long ans;
long long k, c[200];
vector<int> a;
int main() {
  scanf("%d%lld", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    c[i] = x;
    for (int j = 1; j * j <= x; j++) {
      a.push_back(j);
      a.push_back((x - 1) / j + 1);
    }
    k += x;
  }
  sort(a.begin(), a.end());
  a.erase(unique(a.begin(), a.end()), a.end());
  for (int i = 0; i < a.size(); i++) {
    long long x = a[i], now = 0;
    for (int i = 1; i <= n; i++) now += (c[i] - 1) / x + 1;
    now = k / now;
    if (now >= x) ans = max(ans, now);
  }
  printf("%lld\n", ans);
}
