#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using int64 = long long int;
template <typename T>
void chmax(T &a, T b) {
  a = max(a, b);
}
template <typename T>
void chmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void chadd(T &a, T b) {
  a = a + b;
}
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const int INF = 1LL << 29;
const ll LONGINF = 1LL << 60;
const ll MOD = 1000000007LL;
ll dp[2010];
int main() {
  ll N, E, T;
  scanf("%lld%lld%lld", &N, &E, &T);
  if (N > 2000) return 1;
  vector<ll> S(N + 1);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &S[i + 1]);
  }
  fill(dp, dp + N + 1, LONGINF);
  dp[0] = 0;
  ll ans = (S[1] - 0) + (E - S[N]);
  for (int i = 0; i <= N; i++) {
    if (i == N) continue;
    for (int j = i; j < N; j++) {
      ll d = S[j + 1] - S[i + 1], e = 0;
      if (j + 1 < N) e = S[j + 2] - S[j + 1];
      ll c1 = dp[i] + 3 * d, c2 = dp[i] + T + d;
      chmin(dp[j + 1], max(c1, c2) + e);
    }
  }
  ans += dp[N];
  printf("%lld\n", ans);
  return 0;
}
