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