#include <bits/stdc++.h>
using namespace std;
int IN() {
  int c, f, x;
  while (!isdigit(c = getchar()) && c != '-')
    ;
  c == '-' ? (f = 1, x = 0) : (f = 0, x = c - '0');
  while (isdigit(c = getchar())) x = (x << 1) + (x << 3) + c - '0';
  return !f ? x : -x;
}
const int N = 100000 + 19;
const long long oo = 1ll << 60;
long long f[N];
int d[N], E, T, n;
int main() {
  n = IN(), E = IN(), T = IN();
  for (int i = 1; i < n + 1; i++) d[i] = IN();
  for (int i = 0; i < N; i++) f[i] = oo;
  f[0] = 0;
  for (int i = 1; i < n + 1; i++) {
    for (int j = 1; j < i + 1; j++) {
      f[i] = min(f[i], f[j - 1] + d[j] - d[j - 1] + max(2 * (d[i] - d[j]), T) +
                           d[i] - d[j]);
    }
  }
  cout << f[n] + E - d[n] << endl;
}
