#include #include using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=1000000007; ll inf=10099999999999990; int main(){ ll n,m; cin >> n >> m; vectora(n); ll ans=inf; ll sum=0; for (ll i = 0; i < n; i++) { cin >> a[i]; sum+=a[i]; ans=min(ans,sum/(i+1)); } cout << ans/m << endl; }