#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 17;
int n;
int t, e;
int x[N];
long long dp[N];
struct SegT {
  long long Min[N << 1], Lazy[N << 1];
  void pushdown(int i) {
    if (!Lazy[i]) return;
    Min[i] += Lazy[i];
    if (i < N) {
      Lazy[i << 1] += Lazy[i];
      Lazy[i << 1 | 1] += Lazy[i];
    }
    Lazy[i] = 0;
  }
  void upd(int l, int r, int v, int i = 1, int a = 0, int b = N) {
    if (l <= a && b <= r) {
      Lazy[i] += v;
      pushdown(i);
      return;
    }
    pushdown(i);
    if (r <= a || b <= l) return;
    int m = (a + b) >> 1;
    if (l < m) upd(l, r, v, i << 1, a, m);
    if (m < r) upd(l, r, v, i << 1 | 1, m, b);
    Min[i] = min(Min[i << 1], Min[i << 1 | 1]);
  }
  long long qry(int l, int r, int i = 1, int a = 0, int b = N) {
    pushdown(i);
    if (l <= a && b <= r) return Min[i];
    if (r <= a || b <= l) return 1e18;
    int m = (a + b) >> 1;
    long long ans = 1e18;
    if (l < m) ans = min(ans, qry(l, r, i << 1, a, m));
    if (m < r) ans = min(ans, qry(l, r, i << 1 | 1, m, b));
    return ans;
  }
} segt;
int main() {
  cin >> n >> e >> t;
  ++n;
  for (int i = 1; i < n; ++i) cin >> x[i];
  dp[0] = 0;
  segt.upd(0, 1, dp[0] + t);
  for (int i = 1, j = 0; i < n; ++i) {
    segt.upd(0, j, (x[i] - x[i - 1]) * 2);
    while (j < i && (x[i] - x[j + 1]) * 2 >= t) {
      segt.upd(j, j + 1, (x[i] - x[j + 1]) * 2 - t);
      ++j;
    }
    dp[i] = segt.qry(0, i);
    segt.upd(i, i + 1, dp[i] + t);
  }
  cout << dp[n - 1] + e << endl;
  return 0;
}
