#include <bits/stdc++.h>
using namespace std;
template <typename T>
T &chmin(T &a, const T &b) {
  return a = min(a, b);
}
template <typename T>
T &chmax(T &a, const T &b) {
  return a = max(a, b);
}
const long long INF = 1e+18;
const long double EPS = 1e-15;
const long long MOD = 1000000007;
const long long dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1};
signed main() {
  long long n, e, t, x[2010] = {}, dp[2010][2010];
  cin >> n >> e >> t;
  if (n > 2000) return 0;
  for (long long i = 1; i <= n; i++) cin >> x[i];
  for (long long i = 0; i <= n; i++) {
    for (long long j = 0; j <= n; j++) dp[i][j] = INF;
  }
  dp[0][0] = 0;
  for (long long i = 1; i <= n; i++) {
    long long mi = INF;
    for (long long j = 0; j <= i; j++) {
      if (i == j)
        dp[i][j] = mi;
      else {
        dp[i][j] = dp[i - 1][j] + x[i] - x[i - 1];
        mi = min(mi, dp[i][j] + max(t, (x[i] - x[j + 1]) * 2));
      }
    }
  }
  cout << dp[n][n] + e - x[n] << endl;
  return 0;
}
