#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100050;
int x[MAXN];
long long dp[MAXN];
int N, E, T;
long long f(int i, int k) {
  return x[i] + dp[k] - x[k] + max(T, 2 * (x[i] - x[k + 1]));
}
int main() {
  scanf("%d%d%d", &N, &E, &T);
  for (int i = 1; i <= N; i++) scanf("%d", &x[i]);
  dp[0] = 0;
  deque<int> deq;
  deq.push_back(0);
  for (int i = 1; i <= N; i++) {
    dp[i] = 1ll * (E + T) * MAXN * 10;
    (void)0;
    while (((int)(deq).size()) > 1 && f(i, deq[0]) >= f(i, deq[1]))
      deq.pop_front();
    (void)0;
    dp[i] = f(i, deq[0]);
    (void)0;
    while (((int)(deq).size()) >= 1 && f(i, deq.back()) >= f(i, i))
      deq.pop_back();
    deq.push_back(i);
    (void)0;
  }
  cout << dp[N] + E - x[N] << endl;
  return 0;
}
