#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n;
long long k, ans, sum;
int a[N];
void check(long long w) {
  sum = 0;
  for (int j = 1; j <= n; j++) sum += w * ((a[j] - 1) / w + 1);
  if (sum <= k) ans = max(ans, w);
}
int main() {
  scanf("%d%I64d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), k += 1ll * a[i];
  for (int i = 1; 1ll * i * i <= k; i++) {
    check(i);
    check(k / i);
  }
  printf("%I64d\n", ans);
  return 0;
}
