#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 5;
int n;
long long k;
int a[N];
long long ans = 0;
long long C = 0;
void updateAns(long long d) {
  long long sum = 0;
  for (int i = 1; i <= n; i++) sum += (a[i] - 1) / d + 1;
  if (d * sum <= C) ans = max(ans, d);
}
int main() {
  cin >> n >> k;
  C = k;
  for (int i = 1; i <= n; i++) scanf("%d", a + i), C += a[i];
  for (long long i = 1; i * i <= C; i++) {
    updateAns(i);
    updateAns(C / i);
  }
  cout << ans << endl;
  return 0;
}
