#include <bits/stdc++.h>
const long long INFLL = 0x3f3f3f3f3f3f3f3fLL;
const int MAXN = 2010;
using namespace std;
int N, T, E, X[MAXN];
long long dp[MAXN];
int main() {
  int i, j;
  scanf("%d%d%d", &N, &E, &T);
  for (i = 1; i <= N; i++) scanf("%d", &X[i]);
  for (i = 1; i <= N; i++) {
    dp[i] = INFLL;
    for (j = 0; j < i; j++) {
      long long nxt = dp[j] + (X[j + 1] - X[j]) +
                      max(T, 2 * (X[i] - X[j + 1])) + (X[i] - X[j + 1]);
      if (nxt < dp[i]) dp[i] = nxt;
    }
  }
  printf("%lld", dp[N] + (E - X[N]));
  return 0;
}
