#define _USE_MATH_DEFINES

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <unordered_map> 
#include <unordered_set>
#include <functional>

using namespace std;

typedef pair<long long int, long long int> P;
typedef tuple<int, int, int> T;

long long int INF = 1e18;
long long int MOD = 1e9 + 7;

int main(){
	long long int n, t;
	cin >> n >> t;
	long long int h_pre = 0, pos, rem;
	for(int i = 0; i < n; i++){
		long long int h;
		cin >> h;
		if(t <= 0){
			cout << 1 << endl;
			continue;
		}
		if(h_pre <= h){
			h_pre = h;
			pos = t / h + 1;
			cout << pos << endl;
			rem = h - t % h;
		}else{
			rem += h;
			if(rem > h_pre){
				rem -= h_pre;
				pos -= 1;
			}
			cout << max(1LL, pos) << endl;
		}
		t -= h;
	}
	return 0;
}

