#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 58;
template <typename T>
struct SegmentTree {
  const T INF;
  vector<T> seg;
  int sz;
  SegmentTree(int n) : INF(numeric_limits<T>::max()) {
    sz = 1;
    while (sz < n) sz <<= 1;
    seg.assign(2 * sz - 1, INF);
  }
  T merge(T a, T b) { return (min(a, b)); }
  void set(int k, int x) { seg[k + sz - 1] = x; }
  void build() {
    for (int k = sz - 2; k >= 0; k--) {
      seg[k] = merge(seg[2 * k + 1], seg[2 * k + 2]);
    }
  }
  T rmq(int a, int b, int k, int l, int r) {
    if (a >= r || b <= l) return (INF);
    if (a <= l && r <= b) return (seg[k]);
    return (merge(rmq(a, b, 2 * k + 1, l, (l + r) >> 1),
                  rmq(a, b, 2 * k + 2, (l + r) >> 1, r)));
  }
  T rmq(int a, int b) { return (rmq(a, b, 0, 0, sz)); }
  void update(int k, T x) {
    k += sz - 1;
    seg[k] = x;
    while (k > 0) {
      k = (k - 1) >> 1;
      seg[k] = merge(seg[2 * k + 1], seg[2 * k + 2]);
    }
  }
};
int main() {
  long long N, T, E, X[2002];
  cin >> N >> T >> E;
  for (int i = 1; i <= N; i++) cin >> X[i];
  auto chmin = [](long long &a, long long b) { a = min(a, b); };
  long long dp[200002];
  fill_n(dp, 200002, INF);
  SegmentTree<long long> dp2(N + 1);
  dp[0] = 0;
  dp[1] = E;
  dp2.update(0, dp[0] - X[1] * 2);
  dp2.update(1, dp[1] - X[2] * 2);
  for (int i = 2; i <= N; i++) {
    int low = 0, high = i - 1;
    while (high - low > 0) {
      int mid = (low + high) >> 1;
      if ((X[i] - X[mid + 1]) * 2 <= E)
        high = mid;
      else
        low = mid + 1;
    }
    dp[i] = min(dp[low] + E, X[i] * 2 + dp2.rmq(0, low));
    dp2.update(i, dp[i] - X[i + 1] * 2);
  }
  cout << dp[N] + T << endl;
}
