#include <bits/stdc++.h>
using namespace std;
template <class T>
void read(T &res) {
  res = 0;
  T f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    res = res * 10 + c - '0';
    c = getchar();
  }
  res *= f;
}
template <class T>
void out(T x) {
  if (x < 0) {
    x = -x;
    putchar('-');
  }
  if (x >= 10) {
    out(x / 10);
  }
  putchar('0' + x % 10);
}
long long dp[100005], pre;
long long T, E;
long long x[100005];
int N, p;
deque<int> que;
void Solve() {
  read(N);
  read(E);
  read(T);
  for (int i = 1; i <= N; ++i) {
    read(x[i]);
    dp[i] = i * T;
  }
  p = -1;
  pre = 0;
  for (int i = 1; i <= N; ++i) {
    if (p < i - 1 && 2 * (x[i] - x[p + 2]) > T) {
      ++p;
      pre = min(pre, dp[p] - 2 * x[p + 1]);
    }
    if (p != -1) dp[i] = min(dp[i], pre + 2 * x[i]);
    while (!que.empty() && 2 * (x[i] - x[que.front() + 1]) > T) {
      que.pop_front();
    }
    if (!que.empty()) {
      dp[i] = min(dp[i], dp[que[0]] + T);
    }
    while (!que.empty() && dp[que.back()] > dp[i]) que.pop_back();
    que.push_back(i);
  }
  out(dp[N] + E);
  putchar('\n');
}
int main() {
  Solve();
  return 0;
}
