#include <bits/stdc++.h>
using namespace std;
constexpr int MOD = 1000000007;
constexpr long long INF = 1LL << 60;
long long N, E, T;
long long x[2000];
long long dp[2005][2005];
int main() {
  cin >> N >> E >> T;
  x[0] = 0;
  for (int j = 1; j <= N; ++j) {
    cin >> x[j];
  }
  if (N > 2000) {
    assert(false);
  }
  for (int j = 0; j <= N; ++j) {
    fill(dp[j], dp[j] + N + 1, INF);
  }
  for (int j = 0; j <= N; ++j) {
    dp[j][0] = x[j];
  }
  for (int j = 1; j <= N; ++j) {
    for (int k = 1; k < j; ++k) {
      dp[j][j] = min(dp[j][j], max(dp[j][k - 1] + T,
                                   dp[k][k - 1] + max(T, 2 * (x[j] - x[k])) +
                                       x[j] - x[k]));
    }
    dp[j][j] = min(dp[j][j], dp[j][j - 1] + T);
    for (int k = j + 1; k <= N; ++k) {
      dp[k][j] = dp[j][j] + (x[k] - x[j]);
    }
  }
  cout << (dp[N][N] + E - x[N]) << endl;
  return 0;
}
