#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
int n, a[MAXN];
long long int k;
vector<long long int> num;
inline long long int calc(int d) {
  int i;
  long long int sum = 0LL;
  for (i = 1; i <= n; ++i) sum += (a[i] + d - 1) / d;
  return sum;
}
int main() {
  int i, j, border;
  long long int sum, ans = 0LL;
  cin >> n >> k;
  for (i = 1; i <= n; ++i) {
    cin >> a[i];
    k += a[i];
    for (j = 1; j < a[i]; j = border + 1) {
      border = (a[i] - 1) / ((a[i] + j - 1) / j - 1);
      num.push_back(j);
    }
    num.push_back(a[i]);
  }
  sort(num.begin(), num.end());
  num.resize(unique(num.begin(), num.end()) - num.begin());
  num.push_back(1e13 + 1);
  for (i = 0; i < int(num.size()) - 1; ++i) {
    sum = calc(num[i]);
    if (sum * num[i] > k) continue;
    ans = max(ans, min(k / sum, num[i + 1] - 1));
  }
  cout << ans << endl;
  return 0;
}
