#include<bits/stdc++.h>
#define lambda(res,...) (function<res(__VA_ARGS__)>)[&](__VA_ARGS__)
#define method(name,res,...) function<res(__VA_ARGS__)> name = lambda(res,__VA_ARGS__)
using namespace std;
#define int long long

signed main(){
	int n;
	int t;
	cin >> n >> t;
	method(func,vector<int>,int t,vector<int> line){
		vector<int> ans;
		vector<int> times;
		ans.emplace_back(t/line.front()+1);
		times.emplace_back(ans.front()*line.front());
		int last_ans = ans.front();
		int last_time = times.front();
		int d = line.front();
		for(int i=1;i<line.size();++i){
			last_time += line[i];
			while(last_time>t){
				last_time -= d;
				--last_ans;
			}
			++last_ans;
			last_time += d;
			ans.emplace_back(last_ans);
		}
		return ans;
	};

	method(sum,int,vector<int> line){
		int res = 0;
		for(auto&i:line)res+=i;
		return res;
	};

	method(output,void,vector<int> line){
		for(auto&i:line)cout << max(1LL,i) << endl;
	};
	vector<int> line;
	for(int i=0;i<n;++i){
		int h;
		cin >> h;
		if(line.empty() or line.front()>h){
			line.emplace_back(h);
		}else{
			output(func(t,line));
			t -= sum(line);
			line.clear();
			line.emplace_back(h);
			t = max(t,0LL);
		}
	}

	output(func(t,line));

	return 0;
}

