#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<queue>
#define LL long long
#define inl inline
#define re register
#define MAXN 101000
using namespace std;
struct line
{
	LL a,b;
	line(LL _a=0,LL _b=0){a=_a,b=_b;}
	void push(LL _a,LL _b){a=_a,b=_b;}
	LL f(LL i){return a+(i-1)*b;}
	LL get(LL i){return max((i-a+b-1)/b,0ll)+1;}
}y[MAXN];
int n;
LL h[MAXN],t,sum[MAXN];
int main()
{
	scanf("%d%lld",&n,&t);
	for(int i=1;i<=n;i++)
		scanf("%lld",&h[i]),sum[i]=h[i]+sum[i-1];
	y[1].push(h[1],h[1]);
	for(int i=2;i<=n;i++)
	{
		if(y[i-1].f(1)+1<=sum[i]&&sum[i]<=y[i-1].f(2))
			 y[i].push(sum[i],y[i-1].f(2)-sum[i]+h[i]);
		else y[i].push(sum[i],h[i]);
	}
	for(int i=1;i<=n;i++)
		printf("%lld\n",y[i].get(t+1));
	return 0;
}
/*
3 0
5
7
3
*/

