#include <bits/stdc++.h>
using namespace std;
int n;
long long k, a[110], sum, w[120];
int main() {
  ios::sync_with_stdio(false);
  memset(w, 0, sizeof(w));
  cin >> n >> k;
  sum = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  int flag;
  long long r = 1, v, u, y, x;
  long long ans = 1;
  while (1) {
    flag = 0;
    x = 0;
    for (int i = 1; i <= n; i++) {
      w[i] = a[i] / r;
      x += (1 + w[i]);
      if (w[i]) flag = 1;
    }
    v = 1e12;
    for (int i = 1; i <= n; i++)
      if (w[i]) v = min(v, (a[i] / w[i]));
    u = k;
    for (int i = 1; i <= n; i++) u = u - ((w[i] + 1) * v - a[i]) % v;
    if (u >= 0) ans = v;
    y = sum + k;
    y /= x;
    if (y >= r && y < v) ans = max(ans, y);
    if (!flag) break;
    r = v + 1;
  }
  cout << ans << endl;
  return 0;
}
