#include <bits/stdc++.h>
using namespace std;
long long n, a[111], C, as, i, s;
void f(long long d) {
  for (s = 0, i = 1; i <= n; ++i)
    s += d * ((a[i] - 1) / d + 1), i == n && s <= C ? (as = max(as, d)) : 1;
}
int main() {
  cin >> n >> C;
  for (i = 1; i <= n; ++i) cin >> a[i], C += a[i];
  for (int i = 1; 1ll * i * i <= C; ++i) f(i), f(C / i);
  cout << as << endl;
  return 0;
}
