#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 58;
int N, T, E, X[2002];
long long dp[2003][2003];
long long getCost(int Left, int Right) {
  return (max(T, (X[Right] - X[Left]) * 2));
}
long long rec(int endd, int idx) {
  if (idx == N - 1) return (getCost(endd, idx));
  if (~dp[endd][idx]) return (dp[endd][idx]);
  long long ret = INF;
  ret = min(ret,
            rec(idx + 1, idx + 1) + getCost(endd, idx) + X[idx + 1] - X[idx]);
  ret = min(ret, rec(endd, idx + 1) + X[idx + 1] - X[idx]);
  return (dp[endd][idx] = ret);
}
int main() {
  cin >> N;
  if (N > 2000) throw(0);
  cin >> E >> T;
  for (int i = 0; i < N; i++) {
    cin >> X[i];
  }
  memset(dp, -1, sizeof(dp));
  cout << rec(0, 0) + X[0] + E - X[N - 1] << endl;
}
