#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e6;
int32_t main() {
  ios_base::sync_with_stdio(0);
  long long n, k;
  cin >> n >> k;
  vector<long long> v(n);
  for (long long &x : v) {
    cin >> x;
    k += x;
  }
  for (long long i = 1; i <= k; i = k / (k / i) + 1) {
    long long d = k / i;
    long long sm = 0;
    for (long long &x : v) {
      sm += (x + d - 1) / d;
    }
    if (d <= k / sm) {
      cout << d << endl;
      return 0;
    }
  }
}
