#include <bits/stdc++.h>
using namespace std;
int a[200], n;
bool check(long long d, long long kuai) {
  long long tem = 0;
  for (int i = 0; i < n; i++) {
    tem += (a[i] + d - 1) / d;
  }
  return tem <= kuai;
}
int main() {
  long long k;
  scanf("%d%lld", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    k += a[i];
  }
  long long ans = -1;
  for (long long l = 1, r; l <= k; l = r + 1) {
    r = k / (k / l);
    if (check(r, k / r)) ans = max(ans, r);
  }
  printf("%lld\n", ans);
  return 0;
}
