#include <iostream>
#include <utility>
#include <tuple>
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <algorithm>
#include <functional>
#include <climits>
#include <numeric>
#include <queue>
#include <cmath>
#include <iomanip>
#include <array>
#include <string>

int main() {
	int n, t; std::cin >> n >> t;
	std::vector<int> health(n); for (auto& h : health) std::cin >> h;
	std::vector<int> first_end_time(n, 0), last_end_time(n, 0), last_check(n, 0), step_time{ health };
	last_check[0] = t / health[0] + 1; first_end_time[0] = t >= health[0] ? health[0] : 0; last_end_time[0] = t / health[0] * health[0];
	for (auto i = 1; i < n; ++i) {
		step_time[i] = std::max(step_time[i], step_time[i - 1]);
		if (step_time[i] > step_time[i - 1]) {
			last_check[i] = (t - first_end_time[i - 1]) / step_time[i] + 1;
			last_end_time[i] = (t - first_end_time[i - 1]) / step_time[i] * step_time[i] + first_end_time[i - 1];
		}
		else {
			last_check[i] = t >= last_end_time[i - 1] + health[i] ? last_check[i - 1] : std::max(1, last_check[i - 1] - 1);
			last_end_time[i] = t >= last_end_time[i - 1] + health[i] ? last_end_time[i - 1] + health[i] : last_end_time[i - 1] + health[i] - step_time[i];
		}
		first_end_time[i] = std::min(t, first_end_time[i - 1] + health[i]);
	}
	for (const auto c : last_check) {
		std::cout << c << '\n';
	}
}
