#include <bits/stdc++.h>
using namespace std;
long long n, k, a[210], answer;
bool judge(long long p) {
  long long result = 0;
  for (long long i = 1; i <= n; i++) result += (a[i] - 1) / p + 1;
  return result * p <= k ? true : false;
}
int main() {
  long long i, s = 0;
  cin >> n >> k;
  for (i = 1; i <= n; i++) cin >> a[i], k += a[i];
  for (i = sqrt(k); i >= 1; i--) {
    if (judge(i)) answer = max(answer, i);
    if (judge(k / i)) answer = max(answer, k / i);
  }
  cout << answer;
}
