#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T& num) {
  bool start = false, neg = false;
  char c;
  num = 0;
  while ((c = getchar()) != EOF) {
    if (c == '-')
      start = neg = true;
    else if (c >= '0' && c <= '9') {
      start = true;
      num = num * 10 + c - '0';
    } else if (start)
      break;
  }
  if (neg) num = -num;
}
const int maxn = (int)(1e5) + 5;
const long long INF = (long long)(1e18);
long long x[maxn], f[maxn];
int main() {
  int n, e, t;
  read(n);
  read(e);
  read(t);
  for (int i = (1); i <= (n); i++) read(x[i]);
  f[0] = 0;
  x[0] = 0;
  for (int i = (1); i <= (n); i++) {
    f[i] = INF;
    for (int j = (1); j <= (i); j++)
      f[i] = min(f[i], f[j - 1] + x[j] - x[j - 1] + 3 * (x[i] - x[j]) +
                           max(0LL, t - 2 * (x[i] - x[j])));
  }
  printf("%lld\n", f[n] + e - x[n]);
  return 0;
}
