#include <bits/stdc++.h>
using namespace std;
priority_queue<int, vector<int>, greater<int> > Q;
int n, a[105];
long long k;
int main() {
  int i, j, x, y;
  int mxa = 0;
  scanf("%d%I64d", &n, &k);
  for (i = 1; i <= n; ++i) {
    scanf("%d", &a[i]), k += a[i];
    if (a[i] > mxa) mxa = a[i];
    for (j = 1; j * j <= a[i]; ++j) {
      int tmp = a[i] / j;
      if (a[i] % j) tmp++;
      Q.push(-tmp);
    }
  }
  for (i = 1; i * i <= mxa; ++i) Q.push(-i);
  long long s;
  int pre = 0;
  while (!Q.empty()) {
    int x = Q.top();
    Q.pop();
    x = -x;
    if (x == pre) continue;
    for (s = 0, j = 1; j <= n; ++j) {
      s += a[j] / x;
      if (a[j] % x) s++;
    }
    if (s * x <= k) break;
    pre = x;
  }
  long long ans;
  if (!pre) {
    ans = k / s;
  } else {
    if (s * (pre - 1) <= k)
      ans = pre - 1;
    else
      ans = k / s;
  }
  printf("%I64d", ans);
  return 0;
}
