#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0;
  bool f = 0;
  char ch = getchar();
  while (ch < '0' || '9' < ch) f |= ch == '-', ch = getchar();
  while ('0' <= ch && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return f ? -x : x;
}
int n;
long long K, s, g, now, Ans, k[109], a[109];
priority_queue<pair<int, int> > q;
int main() {
  n = read();
  K = read();
  for (int i = 1; i <= n; i++) k[i] = read(), g += k[i], a[i] = k[i];
  now = 1;
  Ans = 1;
  s = 0;
  for (int i = 1; i <= n; i++) q.push(pair<int, int>(-2, i));
  while (!q.empty()) {
    pair<int, int> nd = q.top();
    q.pop();
    int Q = -nd.first, x = nd.second;
    if (Q != now) {
      if (K >= s) {
        if (now + (K - s) / g <= Q)
          Ans = now + (K - s) / g;
        else
          Ans = Q;
      }
      s += g * (Q - now), now = Q;
    }
    s -= a[x] * Q - k[x];
    s += (Q - k[x] % Q) % Q;
    g -= a[x];
    a[x] = (k[x] + Q - 1) / Q;
    g += a[x];
    if (a[x] != 1)
      q.push(pair<int, int>(
          (k[x] + (k[x] + Q - 1) / Q - 2) / ((k[x] + Q - 1) / Q - 1) * (-1),
          x));
  }
  if (K >= s) Ans = now + (K - s) / g;
  printf("%lld\n", Ans);
  return 0;
}
