#include <bits/stdc++.h>
using namespace std;
int n;
long long k, a[110], d;
long long func(long long val) {
  long long hold = 0;
  for (int i = 0; i < n; i++) {
    hold += (long long)ceil((double)a[i] / (double)val);
  }
  hold = k / hold;
  return hold;
}
int main() {
  scanf("%d%lld", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%lld", a + i);
    k += a[i];
  }
  long long ans = 1;
  for (long long i = 1; i <= k; i++) {
    d = k / i;
    if (func(d) >= d) ans = max(ans, d);
    i = k / d;
  }
  printf("%lld\n", ans);
  return 0;
}
