#include <bits/stdc++.h>
template <typename T>
void swap(T &x, T &y) {
  T t = x;
  x = y;
  y = t;
  return;
}
template <typename T>
T abs(T x) {
  return (0 <= x ? x : -x);
}
template <typename T>
T max(T a, T b) {
  return (b <= a ? a : b);
}
template <typename T>
T min(T a, T b) {
  return (a <= b ? a : b);
}
template <typename T>
bool setmin(T &a, T b) {
  if (a <= b) {
    return false;
  } else {
    a = b;
    return true;
  }
}
template <typename T>
bool setmax(T &a, T b) {
  if (b <= a) {
    return false;
  } else {
    a = b;
    return true;
  }
}
template <typename T>
T gcd(T a, T b) {
  return (b == 0 ? a : gcd(b, a % b));
}
template <typename T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
long long signed int n, e, t, x[2001];
long long signed int dp[2001];
int main() {
  scanf("%lld%lld%lld", &n, &e, &t);
  if (n > 2000) {
    return 1;
  }
  for (int i = (1); i <= (n); i++) {
    scanf("%lld", &x[i]);
  }
  for (int i = (1); i <= (n); i++) {
    long long signed int mi = 1000000000000000LL;
    for (int j = (0); j < (i); j++) {
      long long signed int v =
          dp[j] + (x[i] - x[j]) + max(2 * (x[i] - x[j + 1]), t);
      setmin(mi, v);
    }
    dp[i] = mi;
  }
  printf("%lld\n", dp[n] + (e - x[n]));
  return 0;
}
