#include <bits/stdc++.h>
using namespace std;
long long ar[100];
int n;
vector<long long> vev;
long long fun(long long mas) {
  long long ret = 0;
  int i;
  for (i = 0; i <= n - 1; i++) {
    ret += ((ar[i] + mas - 1) / mas);
  }
  return ret;
}
int main() {
  long long umax;
  int i, j;
  cin >> n >> umax;
  for (i = 0; i <= n - 1; i++) {
    cin >> ar[i];
    umax += ar[i];
    for (j = 1; j * j <= ar[i]; j++) {
      vev.push_back(j);
      vev.push_back((ar[i] + j - 1) / j);
    }
  }
  sort(vev.begin(), vev.end());
  vev.erase(unique(vev.begin(), vev.end()), vev.end());
  vev.push_back(LLONG_MAX);
  long long d, has = 0;
  for (i = 0; i <= (int)vev.size() - 2; i++) {
    d = umax / fun(vev[i]);
    d = min(d, vev[i + 1] - 1);
    if (d >= vev[i]) {
      has = d;
    }
  }
  cout << has << "\n";
}
