#include <bits/stdc++.h>
using namespace std;
long long n, k, ans = 1, a[233];
bool C(long long x) {
  long long sum = 0;
  for (long long i = 1; i <= n; i++) sum += (a[i] - 1) / x + 1;
  return sum * x <= k;
}
int main() {
  cin >> n >> k;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    k += a[i];
  }
  for (long long i = sqrt(k); i > 0; i--) {
    if (C(i)) ans = max(ans, i);
    if (C(k / i)) ans = max(ans, k / i);
  }
  cout << ans;
}
