#include <bits/stdc++.h>
using namespace std;
map<long long, long long> mp;
int A[105];
long long k;
long long infinity = 1000000000000LL;
void addEntry(int number) {
  mp[number] += 1;
  int last = number;
  for (int i = 2; i * i <= number; i++) {
    int index = number / i + (number % i != 0);
    if (last == index) continue;
    mp[index] += i;
    mp[last] -= i;
    last = index;
  }
  int newStart = sqrt(number);
  if (newStart * newStart != number)
    newStart++;
  else
    newStart--;
  for (int i = min(last - 1, newStart); i >= 1; i--) {
    int val = number / i + (number % i != 0);
    mp[i] += val;
    mp[i + 1] -= val;
  }
}
int main() {
  int n;
  long long sum = 0;
  cin >> n >> k;
  sum += k;
  for (int i = 0; i < n; ++i) {
    scanf("%d", A + i);
    sum += A[i];
  }
  for (int i = 0; i < n; i++) {
    addEntry(A[i]);
  }
  int start = 1;
  mp[infinity] += 0;
  long long ans = -1;
  map<long long, long long>::iterator it = mp.begin();
  long long lhs = it->second;
  long long startDay = it->first;
  for (it++; it != mp.end(); it++) {
    long long endDay = it->first;
    long long posDay = sum / lhs;
    if (posDay >= startDay && posDay < endDay) {
      ans = posDay;
    }
    startDay = endDay;
    lhs += it->second;
  }
  printf("%lld\n", ans);
}
