#include <bits/stdc++.h>
using namespace std;
inline void chmin(long long &x, long long y) {
  if (x > y) x = y;
}
struct RMQ {
  int N;
  vector<long long> seg;
  RMQ(int n) {
    N = 1 << (int)log2(n * 2 - 1);
    seg.resize(N * 2, 1e18);
  }
  void update(int k, long long v) {
    for (seg[k += N] = v; k > 1; k >>= 1) {
      seg[k >> 1] = min(seg[k], seg[k ^ 1]);
    }
  }
  long long minimum(int l, int r) {
    long long res = 1e18;
    for (l += N, r += N; l < r; l >>= 1, r >>= 1) {
      if (l & 1) res = min(res, seg[l++]);
      if (r & 1) res = min(res, seg[--r]);
    }
    return res;
  }
};
long long dp[101010];
int main() {
  int n;
  long long T, E;
  cin >> n >> E >> T;
  vector<long long> x(n), d(n), ds(n + 1);
  for (int i = 0; i < n; i++) scanf("%lld", &x[i]);
  for (int i = 0; i < n - 1; i++) d[i] = x[i + 1] - x[i];
  for (int i = 0; i < n; i++) ds[i + 1] = ds[i] + d[i];
  fill_n(dp, 101010, 1e17);
  dp[0] = 0;
  RMQ L(n + 1), R(n + 1);
  L.update(0, 0);
  R.update(0, 0);
  for (int i = 1; i <= n; i++) {
    int ok = i;
    int ng = -1;
    while (ok - ng > 1) {
      int mid = (ok + ng) / 2;
      if (T >= 2 * (ds[i] - ds[mid]))
        ok = mid;
      else
        ng = mid;
    }
    chmin(dp[i], L.minimum(ok, i));
    chmin(dp[i], R.minimum(0, ok) + 2 * ds[i]);
    L.update(i, dp[i] + T);
    R.update(i, dp[i] - 2 * ds[i]);
  }
  cout << dp[n] + E << endl;
}
