#include <bits/stdc++.h>
const int inf = 0x7f7f7f7f;
void maxs(int& a, int b) {
  if (a < b) a = b;
}
void mins(int& a, int b) {
  if (a > b) a = b;
}
int min(int a, int b) { return a < b ? a : b; }
int n, a[107];
long long k, s1 = 0;
int v1[107];
int mv[256];
void upd(int w, int a) {
  w += 128;
  mv[w] = a;
  for (w >>= 1; w; w >>= 1) mv[w] = min(mv[w << 1], mv[w << 1 ^ 1]);
}
void f1(int w, int x) {
  int y = (a[w] + x - 1) / x;
  s1 += y - v1[w];
  v1[w] = y;
  upd(w, y > 1 ? (a[w] + y - 2) / (y - 1) : inf);
}
int gmn() {
  int w = 1;
  while (w < 128) w = w << 1 ^ (mv[w] == mv[w << 1 ^ 1]);
  return w - 128;
}
int main() {
  memset(mv, 0x7f, sizeof(mv));
  scanf("%d%I64d", &n, &k);
  long long s = 0;
  int mx = 1;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    s += a[i];
    maxs(mx, a[i]);
  }
  long long ans = 1;
  k += s;
  long long L = 1, R;
  for (int i = 1; i <= n; ++i) f1(i, 1);
  while (1) {
    R = mv[1];
    long long z = k / s1;
    if (L <= z && (z < R || R > mx)) ans = z;
    if (z >= R && ans < R - 1) ans = R - 1;
    if (z >= L && ans < z) ans = z;
    if (R > mx) break;
    while (mv[1] == R) {
      int a = gmn();
      f1(a, R);
    }
    L = R;
  }
  printf("%I64d\n", ans);
  return 0;
}
