#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  return (a < b) ? (a = b, 1) : 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  return (b < a) ? (a = b, 1) : 0;
}
using ll = long long;
using R = long double;
const R EPS = 1e-9;
inline int sgn(const R &r) { return (r > EPS) - (r < -EPS); }
inline R sq(R x) { return sqrt(max<R>(x, 0.0)); }
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const ll inf = 1LL << 60;
ll x[200010];
ll dp[2010];
int main(void) {
  ll n, e, t;
  cin >> n >> e >> t;
  if (n > 2000) return 0;
  for (int i = int(1); i < int(n + 1); ++i) cin >> x[i];
  for (int i = int(1); i < int(n + 1); ++i) {
    dp[i] = inf;
    for (int j = int(0); j < int(i); ++j) {
      ll d = x[i] - x[j];
      chmin(dp[i], dp[j] + d + max(t, 2 * (x[i] - x[j + 1])));
    }
  }
  for (int i = int(0); i < int(n + 1); ++i) cout << dp[i] << endl;
  cout << dp[n] + e - x[n] << endl;
  return 0;
}
