#include <bits/stdc++.h>
cat << EOF using namespace std;
template <class T, class U>
inline bool chmax(T& lhs, const U& rhs) {
  if (lhs < rhs) {
    lhs = rhs;
    return 1;
  }
  return 0;
}
template <class T, class U>
inline bool chmin(T& lhs, const U& rhs) {
  if (lhs > rhs) {
    lhs = rhs;
    return 1;
  }
  return 0;
}
constexpr long long inf = 1ll << 60;
int N;
long long X[100001];
long long T, E;
long long dp[100001];
int main() {
  cin >> N >> E >> T;
  for (int i = 0; i < (N); ++i) cin >> X[i + 1];
  if (N > 2000) return 0;
  for (int i = 0; i < (N + 1); ++i) dp[i] = inf;
  dp[0] = 0;
  for (int i = 0; i < (N); ++i) {
    chmin(dp[i + 1], dp[i] + X[i + 1] - X[i] + T);
    for (int j = (i + 2); j <= (N); ++j) {
      chmin(dp[j], dp[i] + max(2 * (X[j] - X[i + 1]), T) + X[j] - X[i]);
    }
  }
  cout << dp[N] + E - X[N] << '\n';
  return 0;
}
