#include <bits/stdc++.h>
using namespace std;
long long n, e, t, curpos;
long long arr[100010];
long long ans;
long long dp[100010];
deque<long long> dp2;
int main() {
  cin >> n >> e >> t;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  dp2.push_back(1e16);
  for (int k = 1; k <= n; k++) {
    dp[k] = 1e16;
    int prevpos = curpos;
    while (curpos < k - 1 && t <= (arr[k] - arr[curpos]) * 2) curpos++;
    dp[k] = dp[curpos] + t;
    dp[k] = min(dp[k], arr[k] * 2 + dp2.front());
    for (int i = prevpos; i <= curpos; i++) {
      while (!dp2.empty() && dp2.back() > dp[i] - arr[i + 1] * 2)
        dp2.pop_back();
      dp2.push_back(dp[i] - arr[i + 1] * 2);
    }
    cout << dp[k] + arr[k] << '\n';
  }
  cout << e + dp[n];
}
