#include <bits/stdc++.h>   using namespace std;   long long arr[105], k;   int n;   bool check(long long x) {     long long sum = 0;     for (int i = 0; i < n; i++) {       sum += (arr[i] + x - 1LL) / x;     }     return x * sum <= k;   }   int main(int argc, char const *argv[]) {     cin >> n >> k;     for (int i = 0; i < n; i++) cin >> arr[i], k += arr[i];     long long ans = 0;     for (long long i = 1; i <= sqrt(k) + 1; i++) {       if (check(i)) ans = max(ans, i);       if (check(k / i)) ans = max(ans, k / i);     }     cout << ans << endl;     return 0;   }   