#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const double PI = acos(-1.0);
const long long MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
int n;
long long k;
int num[105];
int judge(long long x) {
  long long ans = 0;
  for (int i = 1; i <= n; i++) ans = ans + ((long long)num[i] + x - 1) / x;
  if (ans * x <= k) return 1;
  return 0;
}
int main() {
  while (scanf("%d%I64d", &n, &k) != EOF) {
    for (int i = 1; i <= n; i++) {
      scanf("%d", &num[i]);
      k += num[i];
    }
    long long lim = (long long)sqrt((double)k) + 1;
    long long ans = 0;
    for (long long i = 1; i <= lim; i++) {
      if (judge(i)) ans = max(ans, i);
      if (judge(k / i)) ans = max(ans, k / i);
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
