#include <bits/stdc++.h>
const int N = 110;
using namespace std;
int n, tot, a[N];
long long K;
vector<int> v;
int main() {
  cin >> n >> K;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    K += (long long)a[i];
    int j = 1;
    int tmp = a[i] - 1;
    if (tmp > 0) {
      for (int i = 1; i <= tmp; i = j + 1) {
        j = tmp / (tmp / i);
        v.push_back(i);
      }
      v.push_back(tmp + 1);
    }
  }
  v.push_back(1);
  sort(v.begin(), v.end());
  v.resize(distance(v.begin(), unique(v.begin(), v.end())));
  long long ans = 1, sum;
  for (int i = 0; i < (int)v.size() - 1; i++) {
    int l = v[i];
    int r = v[i + 1] - 1;
    sum = 0;
    for (int j = 1; j <= n; j++) sum += (a[j] - 1LL) / l + 1LL;
    long long tmp = min(K / sum, (long long)r);
    if (tmp >= l) ans = tmp;
  }
  long long l = v[v.size() - 1];
  long long tmp = K / n;
  if (tmp >= l) ans = tmp;
  cout << ans << endl;
}
