#include <bits/stdc++.h>
using namespace std;
constexpr long long INF = 1e18;
long long dp[2001], wt[2001];
long long N, T, E;
long long x[2001];
int main() {
  scanf("%lld %lld %lld", &N, &E, &T);
  for (int i = 1; i <= N; ++i) scanf("%lld", x + i);
  dp[1] = x[1] + T;
  wt[1] = T;
  for (int i = 2; i <= N; ++i) {
    long long mn = INF;
    int mnj;
    for (int j = 1; j < i; ++j) {
      long long val = max(0LL, T - 2 * (x[i] - x[j])) * (j - i + 1) +
                      3 * (x[i] - x[j]) + dp[j] - wt[j];
      if (val < mn) mn = val, mnj = j;
    }
    if (mn < dp[i - 1] + x[i] - x[i - 1] + T)
      wt[i] = max(0LL, T - 2 * (x[i] - x[mnj]));
    else {
      wt[i] = T;
      mn = dp[i - 1] + x[i] - x[i - 1] + T;
    }
    dp[i] = mn;
  }
  printf("%lld\n", dp[N] + E - x[N]);
}
