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