#include using namespace std; using int64 = long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; int64 s; cin >> n >> s; vector a(n); for (auto& x : a) cin >> x; sort(a.rbegin(), a.rend()); auto feasible = [&](int64 t) { int64 required = 0; for (int64 i = 0; i < n && a[i] > t; i += t) { required += a[i]; if (required >= s) return false; } return true; }; int64 lo = 0, hi = a[0]; while (hi - lo > 1) { int64 mid = lo + (hi - lo) / 2; if (feasible(mid)) hi = mid; else lo = mid; } cout << hi << '\n'; }