#include <bits/stdc++.h>
using namespace std;
long long a[101], n, k, d, sum;
long long calc(long long n, long long k) {
  long long tot(0), i;
  for (i = 1; i <= n; i++) tot += (a[i] - 1) / k;
  return tot;
}
bool check(long long d) { return (n + calc(n, d)) * d <= sum; }
signed main() {
  long long i;
  scanf("%lld%lld", &n, &k);
  sum = k;
  for (i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    sum += a[i];
  }
  for (i = 1; i * i <= sum; i++) {
    if (check(i)) d = max(d, i);
    if (check(sum / i)) d = max(d, sum / i);
  }
  printf("%lld", d);
}
