typedef long long ll; typedef long double ld; #include using namespace std; #define int long long signed main(){ ll n,m; std::cin >> n>>m; vector a(n); ll sum = 0; ll ans= 1e18; for (int i = 0; i < n; i++) { std::cin >> a[i]; sum += a[i]; ans = min(ans, sum/(i+1)/m); } std::cout << ans << std::endl; }