#include <bits/stdc++.h>
using namespace std;
int N, E, T, X[100100];
long long D[100100];
int main() {
  scanf("%d %d %d", &N, &E, &T);
  for (int i = 1; i <= N; i++) scanf("%d", &X[i]);
  for (int i = 1; i <= N; i++) {
    D[i] = 1e18;
    for (int j = 0; j < i; j++) {
      long long d = D[j] + X[i] - X[j] + max(T, 2 * (X[i] - X[j + 1]));
      if (D[i] > d) D[i] = d;
    }
  }
  printf("%lld\n", D[N] + E - X[N]);
  return 0;
}
