#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, arr[100], k;
  set<int> todo;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    k += arr[i];
    for (long long x = 1; x * x <= arr[i]; x++) {
      todo.insert(x);
      todo.insert(arr[i] / x);
      todo.insert(arr[i] / x + 1);
    }
  }
  long long best = 1;
  auto nxtIt = todo.begin();
  for (int i : todo) {
    nxtIt++;
    long long nxtVal = (nxtIt == todo.end()) ? 1LL << 55 : *nxtIt;
    long long sum = 0;
    for (int j = 0; j < n; j++) sum += (arr[j] + i - 1) / i;
    if (sum * i <= k) best = max(best, min(nxtVal - 1, k / sum));
  }
  cout << best;
}
