#include <bits/stdc++.h>
using namespace std;
const int maxn = 101;
struct Data {
  int id;
  long long val;
  void in(int i) {
    id = i;
    scanf("%I64d", &val);
  }
  bool operator<(struct Data tmp) {
    if (val != tmp.val)
      return val < tmp.val;
    else
      return id < tmp.id;
  }
};
struct F {
  Data a[maxn];
  long long K, k;
  int N;
  void init() {
    scanf("%d%I64d", &N, &K);
    k = K;
    for (int i = 1; i <= N; i++) {
      a[i].in(i);
      k += a[i].val;
    }
  }
  bool check(long long x) {
    long long re = 0;
    for (int i = 1; i <= N; i++) re += (a[i].val - 1) / x + 1;
    return re * x <= k;
  }
  void work() {
    long long ans = 0;
    for (int i = sqrt(k); i >= 1; i--) {
      if (check(i)) ans = max(ans, (long long)i);
      if (check(k / i)) ans = max(ans, k / i);
    }
    printf("%I64d\n", ans);
  }
} sol;
int main() {
  sol.init();
  sol.work();
  return 0;
}
