#include <bits/stdc++.h>
using namespace std;
inline long long Getint() {
  char ch = getchar();
  long long x = 0, fh = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') fh = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    (x *= 10) += ch ^ 48;
    ch = getchar();
  }
  return x * fh;
}
const int N = 105;
int n;
long long k, A[N], su, mx;
inline long long Div(long long x, long long d) { return (x + d - 1) / d; }
int main() {
  n = Getint();
  k = Getint();
  for (int i = 1; i <= n; i++) A[i] = Getint(), mx = max(mx, A[i]), su += A[i];
  for (long long i = mx, j; i > 0; i = j - 1) {
    long long tmp = 0;
    j = 0;
    for (int p = 1; p <= n; p++) {
      long long t = Div(A[p], i);
      tmp += t;
      j = max(j, Div(A[p], t));
    }
    if (j * tmp - su <= k) {
      cout << j + (k - j * tmp + su) / tmp << '\n';
      return 0;
    }
  }
  return 0;
}
