#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
long long dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
long long dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
long long N, E, T;
long long x[2200], dp[2200];
signed main() {
  cin >> N >> E >> T;
  for (long long i = 0; i < N; i++) cin >> x[i];
  x[N] = E;
  dp[N] = 0;
  for (long long i = N - 1; i >= 0; i--) {
    dp[i] = LLONG_MAX;
    for (long long j = i + 1; j <= N; j++) {
      dp[i] = min(dp[i], dp[j] + max(T, 2 * (x[j - 1] - x[i])) + x[j] - x[i]);
    }
  }
  cout << x[0] + dp[0] << endl;
  ;
}
