#include <bits/stdc++.h>
using namespace std;
long long INF = 1e18;
deque<pair<long long, long long> > dq;
long long max_constant;
long long N, E, T;
long long off;
long long D[100100];
long long dp[100100];
long long d2[100100];
queue<pair<long long, long long> > Q;
multiset<long long> S2;
int main() {
  cin >> N >> E >> T;
  for (int i = 1; i <= N; ++i) cin >> D[i];
  dp[0] = 0;
  for (int i = 1; i <= N; ++i) {
    dp[i] = INF;
    for (int j = 0; j < i; ++j) {
      dp[i] = min(dp[i], dp[j] + D[i] - D[j] + max(T, 2 * D[i] - 2 * D[j + 1]));
    }
  }
  cout << E - D[N] + dp[N];
}
