#include <bits/stdc++.h>
using namespace std;
constexpr long long MAX_N = 1e5;
constexpr long long INF = 1e10;
long long N, E, T;
vector<long long> X;
int main(void) {
  cin >> N >> E >> T;
  X.push_back(0);
  for (size_t i = 0; i < N; i++) {
    long long x;
    cin >> x;
    X.push_back(x);
  }
  vector<long long> dp(N + 1, 0);
  dp[1] = T;
  for (long long i = 2, j = 0, k = 0; i <= N;) {
    long long L = max(2 * (X[i] - X[j + 1]), T);
    if (L == T) {
      dp[i] = min(dp[j] + T, dp[k] + 2 * (X[i] - X[k + 1]));
      i++;
    } else {
      long long dpj = dp[j] + L;
      long long dpk = dp[k] + max(2 * (X[i] - X[k + 1]), T);
      if (dpj < dpk) {
        k = j;
      }
      j++;
    }
  }
  cout << dp[N] + E << endl;
  return 0;
}
