#include <bits/stdc++.h>
using namespace std;
int IN() {
  int x = 0, f = 0, ch;
  for (; (ch = getchar()) < '0' || ch > '9';) f = (ch == '-');
  for (; ch >= '0' && ch <= '9'; (ch = getchar())) x = x * 10 + ch - '0';
  return f ? -x : x;
}
int N, E;
long long T, X[100005], F[100005];
int main(int argc, char* argv[]) {
  N = IN();
  E = IN();
  T = IN();
  for (int i = 1, lim = N; i <= lim; i++) X[i] = IN();
  for (int i = 1, lim = N; i <= lim; i++) {
    F[i] = 1ll << 60;
    for (int j = 1, lim = i; j <= lim; j++)
      F[i] = min(F[i], F[j - 1] + X[j] - X[j - 1] + max(T, (X[i] - X[j]) * 2) +
                           (X[i] - X[j]));
  }
  cout << F[N] + E - X[N] << endl;
  return 0;
}
