#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433832795l;
template <typename T>
inline auto sqr(T x) -> decltype(x * x) {
  return x * x;
}
template <typename T1, typename T2>
inline bool umx(T1& a, T2 b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool umn(T1& a, T2 b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int N = 2010;
long long d[N];
int n, t, e;
int x[N];
int main() {
  cout.setf(ios::showpoint | ios::fixed);
  cout.precision(20);
  d[0] = 0ll;
  cin >> n >> e >> t;
  x[0] = 0;
  for (int i = int(0); i < int(n); ++i) {
    scanf("%d", &x[i + 1]);
  }
  for (int i = int(0); i < int(n + 1); ++i) {
    d[i] = (1ll << 60);
  }
  d[0] = 0ll;
  for (int i = int(0); i < int(n); ++i) {
    for (int j = i + 1; j <= n; ++j) {
      long long wait = t - (2ll * x[j] - 2ll * x[i + 1]);
      umx(wait, 0ll);
      umn(d[j], d[i] + 3ll * (x[j] - x[i]) - 2ll * (x[i + 1] - x[i]) + wait);
    }
  };
  cout << d[n] + e - x[n] << endl;
  return 0;
}
