#include <bits/stdc++.h>
using namespace std;
int N;
long long T, E;
long long dp[100010] = {};
const long long inf = 1e18;
int main() {
  cin >> N >> E >> T;
  vector<long long> X(N + 1, 0);
  for (int i = 1; i <= N; i++) {
    cin >> X[i];
    dp[i] = inf;
  }
  for (int i = 1; i <= N; i++) {
    dp[i] = dp[i - 1] + X[i] - X[i - 1] + T;
    int id = upper_bound(X.begin(), X.end(), X[i] - T / 2) - X.begin();
    for (int j = max(id - 10, 1); j <= min(id + 10, i - 1); j++) {
      dp[i] = min(dp[i], dp[j - 1] + X[j] - X[j - 1] + 3 * (X[i] - X[j]) +
                             max(T - 2 * (X[i] - X[j]), 0LL));
    }
  }
  cout << dp[N] + (E - X[N]) << endl;
}
