#include <bits/stdc++.h>
using namespace std;
const int inf = 2 * 1e9 + 1e8;
const int maxn = 102;
int n;
long long k;
int arr[maxn];
bool check(long long d) {
  long long sum = 0;
  for (int i = 1; i <= n; ++i) sum += 1LL * (arr[i] + d - 1) / d;
  return sum * d <= k;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    k += arr[i];
  }
  int sqk = sqrt((long double)k) + 1;
  long long ans = 1;
  for (int i = 1; i <= sqk; ++i) {
    if (check(i) && i > ans) ans = i;
    if (check(k / i) && k / i > ans) ans = k / i;
  }
  cout << ans;
  return 0;
}
