#include <bits/stdc++.h>
using namespace std;
long long N, S, Z, D = 1;
int a[111], seg[2 * 111 * 40000];
int main() {
  if (fopen("data.in", "r")) freopen("data.in", "r", stdin);
  scanf("%I64d", &N);
  scanf("%I64d", &S);
  for (int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
    for (int j = 1; j * j <= a[i]; j++) {
      seg[Z++] = j;
      seg[Z++] = (a[i] + j - 1) / j;
    }
    S += a[i];
  }
  sort(seg, seg + Z);
  Z = unique(seg, seg + Z) - seg;
  for (int i = 0; i < Z; i++) {
    long long cur = seg[i], tmp = 0;
    for (int j = 0; j < N; j++) tmp += (a[j] + seg[i] - 1) / seg[i];
    if (cur <= S / tmp) D = max(D, S / tmp);
  }
  printf("%I64d\n", D);
  return 0;
}
