#include <bits/stdc++.h>
unsigned readUnsigned() {
  int c;
  do {
    c = ::getchar_unlocked();
  } while (c < '0');
  unsigned result = c - '0';
  while ((c = ::getchar_unlocked()) >= '0') {
    result *= 10;
    result += c - '0';
  }
  return result;
}
const unsigned MAX_N = 100 * 1000;
unsigned N, E, T;
unsigned xs[MAX_N];
long long unsigned simpleDP() {
  uint64_t dp[MAX_N];
  dp[N - 1] = T + E - xs[N - 1];
  for (unsigned i = N - 1; i--;) {
    dp[i] = T + xs[i + 1] - xs[i] + dp[i + 1];
    unsigned j = i + 1;
    for (; j < N; ++j) {
      uint64_t cost = 2 * (xs[j] - xs[i]);
      if (cost < T) cost = T;
      if (j + 1 < N) {
        cost += xs[j + 1] - xs[i] + dp[j + 1];
      } else {
        cost += E - xs[i];
      }
      dp[i] = std::min(dp[i], cost);
    }
  }
  return xs[0] + dp[0];
}
int main() {
  N = readUnsigned();
  E = readUnsigned();
  T = readUnsigned();
  for (unsigned i = 0; i < N; ++i) {
    xs[i] = readUnsigned();
  }
  printf("%llu\n", simpleDP());
}
