#include <bits/stdc++.h>
using namespace std;
struct Matrix {
  vector<vector<int>> data;
  int r, c;
  Matrix(int row, int col, bool identity = false) : r(row), c(col) {
    data.assign(row, vector<int>(col, 0));
    if (identity) {
      for (int i = 0; i < r; ++i) {
        data[i][i] = 1;
      }
    }
  }
  Matrix operator*(Matrix& other) {
    int m = r, n = c, p = other.c;
    Matrix res(m, p);
    for (int i = 0; i < m; ++i) {
      for (int j = 0; j < p; ++j) {
        for (int k = 0; k < n; ++k) {
          res.data[i][j] += data[i][k] * other.data[k][j];
        }
      }
    }
    return res;
  }
};
vector<int> extendGcd(int a, int b) {
  if (b == 0) {
    return {a, 1, 0};
  } else {
    vector<int> tmp = extendGcd(b, a % b);
    return {tmp[0], tmp[2], tmp[1] - (a / b) * tmp[2]};
  }
}
Matrix matrix_power(Matrix base, long long exp) {
  int n = base.r;
  Matrix res(n, n, true);
  while (exp) {
    if (exp & 1) {
      res = res * base;
    }
    base = base * base;
    exp >>= 1;
  }
  return res;
}
long long power_mod(long long base, int exp) {
  long long res = 1;
  while (exp) {
    if (exp & 1) res = res * base % 1000000007;
    base = base * base % 1000000007;
    exp >>= 1;
  }
  return res;
}
long long power(long long base, int exp) {
  long long res = 1;
  while (exp) {
    if (exp & 1) res *= base;
    base *= base;
    exp >>= 1;
  }
  return res;
}
long long inv(long long a) { return power_mod(a, 1000000007 - 2); }
long long fac[100010];
void initFac() {
  fac[0] = 1;
  for (int i = 1; i < 100010; ++i) {
    fac[i] = i * fac[i - 1] % 1000000007;
  }
}
long long Combine(long long a, long long b) {
  return (fac[a] * inv(fac[b]) % 1000000007) * inv(fac[a - b]) % 1000000007;
}
int n;
long long k;
int a[110];
set<long long> cand;
long long bound;
int main() {
  cin >> n >> k;
  bound = k;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    bound += a[i];
    for (int j = 1; j <= sqrt(a[i]); ++j) {
      cand.insert(j);
      cand.insert(ceil(1.0 * a[i] / j));
    }
  }
  long long res = 0;
  for (auto it = cand.rbegin(); it != cand.rend(); ++it) {
    long long num = *it;
    long long tmp = 0;
    for (int j = 0; j < n; ++j) {
      tmp += ceil(1.0 * a[j] / num);
    }
    long long foo = bound / tmp;
    if (foo < num) continue;
    res = (it == cand.rbegin() ? foo : min(foo, *(prev(it)) - 1));
    break;
  }
  cout << res;
  return 0;
}
