#include <bits/stdc++.h>
using namespace std;
inline char nc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline void rea(int &x) {
  char c = nc();
  x = 0;
  int f = 1;
  for (; c > '9' || c < '0'; c = nc())
    if (c == '-') f = -1;
  for (; c >= '0' && c <= '9'; x = x * 10 + c - '0', c = nc())
    ;
  x *= f;
}
inline void rea(long long &x) {
  char c = nc();
  x = 0;
  int f = 1;
  for (; c > '9' || c < '0'; c = nc())
    if (c == '-') f = -1;
  for (; c >= '0' && c <= '9'; x = x * 10 + c - '0', c = nc())
    ;
  x *= f;
}
const int N = 110;
int n, a[N];
vector<int> v;
long long goal, k;
int main() {
  rea(n);
  rea(k);
  for (int i = 1; i <= n; i++) rea(a[i]), goal += a[i], a[i]--;
  goal += k;
  for (int i = 1; i <= n; i++)
    for (int j = 1, d; j <= a[i]; j = d + 1)
      d = a[i] / (a[i] / j), v.push_back(j);
  for (int i = 1; i <= n; i++) v.push_back(a[i] + 1);
  sort(v.begin(), v.end());
  v.resize(unique(v.begin(), v.end()) - v.begin());
  int td, last = 1 << 30;
  for (int s = v.size() - 1; ~s; s--) {
    int d = v[s];
    long long cur = 0;
    for (int i = 1; i <= n; i++) {
      cur += d * (a[i] / d);
    }
    if (1LL * n * d + cur <= goal) {
      td = d;
      break;
    }
    last = d;
  }
  long long cur = 0;
  for (int i = 1; i <= n; i++) cur += (a[i] / td);
  printf("%lld\n", goal / (n + cur));
  return 0;
}
