#include <cstddef>
#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <vector>
#include <array>
#include <unordered_map>
#include <algorithm>
#include <numeric>
#include <limits>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <bitset>
#include <valarray>
#include <utility>
#include <tuple>
#include <cmath>
#include <memory>
#include <random>
#include <fstream>
#include <locale>

using ll = long long;
using ull = unsigned long long;

template <class T>
using vec = std::vector<T>;

template <class T>
using vvec = vec<vec<T>>;

constexpr std::size_t operator""_sz(ull n) { return std::size_t(n); }


int main()
{
    using namespace std;

    ll n, t;
    cin >> n >> t;

    ll ma{};

    ll offset{};

    for (int i = 0; i < n; ++i)
    {
        ll in;
        cin >> in;
        
        ma = max(ma, in);
        auto len = t - offset;
        auto ans = len / ma + 1;
        
        if (len % ma >= in)
            ++ans;
        
        
        cout << max(ans, 1ll) << endl;

        offset += in;
    }
    

    return 0;
}
