#include <bits/stdc++.h>
void run(void) {
  int32_t n, e, t;
  scanf("%" SCNi32 "%" SCNi32 "%" SCNi32, &n, &e, &t);
  if (n > 2000) exit(1);
  int32_t *x = (int32_t *)calloc(n + 2, sizeof(int32_t));
  for (int32_t i = 1; i <= n; ++i) {
    scanf("%" SCNi32, x + i);
  }
  x[n + 1] = e;
  int64_t *dp = (int64_t *)calloc(n + 1, sizeof(int64_t));
  for (int32_t i = 1; i <= n; ++i) {
    int64_t local = 100000000000000000LL;
    for (int32_t j = i; j > 0; --j) {
      int64_t p = dp[j - 1] + x[j] - x[j - 1];
      p += ((2 * (x[i] - x[j])) > (t) ? (2 * (x[i] - x[j])) : (t));
      p += x[i] - x[j];
      local = ((local) < (p) ? (local) : (p));
    }
    dp[i] = local;
  }
  printf("%" PRIi64 "\n", dp[n] + e - x[n]);
}
int main(void) {
  run();
  return 0;
}
