#include <bits/stdc++.h>
using namespace std;
const int iinf = 1e9 + 7;
const long long linf = 1ll << 60;
const double dinf = 1e10;
template <typename T>
inline void scf(T &x) {
  bool f = 0;
  x = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') {
    f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  if (f) x = -x;
  return;
}
template <typename T1, typename T2>
void scf(T1 &x, T2 &y) {
  scf(x);
  return scf(y);
}
template <typename T1, typename T2, typename T3>
void scf(T1 &x, T2 &y, T3 &z) {
  scf(x);
  scf(y);
  return scf(z);
}
const int N = 2333;
int n;
long long T;
long long dp[N], x[N];
int main() {
  scf(n);
  scf(x[n + 1]);
  scf(T);
  for (int i = (1); i <= (n); i++) scf(x[i]);
  for (int i = (n); i >= (1); i--) {
    dp[i] = linf;
    for (int j = (i + 1); j <= (n + 1); j++)
      dp[i] = min(dp[i], dp[j] + max(2 * (x[j - 1] - x[i]), T) + x[j] - x[i]);
  }
  printf("%lld\n", dp[1] + x[1]);
  return 0;
}
