#include <bits/stdc++.h>
using namespace std;
int n, a[105];
long long k, ans;
inline bool check(long long d, long long ret = 0) {
  for (register int i = 1; i <= n; ++i) ret += (a[i] - 1) / d + 1;
  return ret <= k / d;
}
int main() {
  scanf("%d%lld", &n, &k);
  for (register int i = 1; i <= n; ++i) scanf("%d", &a[i]), k += a[i];
  for (register long long l = 1, r; l <= k; l = r + 1)
    if (check(r = k / (k / l))) ans = r;
  return printf("%lld", ans), 0;
}
