#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
using tl = tuple<ll, ll, ll, ll>;
using pl = pair<ll, ll>;
using pi = pair<int, int>;
using ld = long double;
const int MAX = 1e5;
ll N, K, A[103];
set<ll> C;
void process(ll u) {
  ll sq = (ll)sqrt(u);
  for (int i = (1); i < (sq + 2); i++) {
    ll tmp = (u + i - 1) / i;
    C.insert(tmp);
    C.insert((tmp + i - 1) / i);
  }
}
ll solve(ll u) {
  ll b = 0, a = 0;
  for (int i = (0); i < (N); i++) {
    ll t = (u + A[i] - 1) / u;
    b += t * u - A[i];
    a += t;
  }
  if (K - b < 0) return -1;
  return (K - b) / a + u;
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  cin >> N >> K;
  for (int i = (0); i < (N); i++) cin >> A[i];
  for (int i = (0); i < (N); i++) {
    process(A[i]);
  }
  for (auto pos = C.rbegin(); pos != C.rend(); pos++) {
    ll tmp = solve(*pos);
    if (~tmp) {
      cout << tmp << endl;
      return 0;
    }
  }
}
