#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 10;
long long a[N];
long long rem, ans, n, k;
void updateans(long long d) {
  long long sum = 0;
  for (long long i = 1; i <= n; i++) {
    sum += (a[i] + d - 1) / d;
  }
  if (d * sum <= rem) ans = max(ans, d);
  return;
}
int main(void) {
  while (~scanf("%I64d%I64d", &n, &k)) {
    rem = k;
    for (long long i = 1; i <= n; i++) {
      scanf("%I64d", &a[i]);
      rem += a[i];
    }
    ans = 0;
    for (long long i = 1; i * i <= rem; i++) {
      updateans(i);
      updateans(rem / i);
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
