#include <bits/stdc++.h>
using namespace std;
long long t[4 * 100005], a[100005];
long long n, e, T;
void upd(int i, int s, int e, int indx, long long val) {
  if (s == e) {
    t[i] = val;
    return;
  }
  int m = (s + e) / 2;
  if (indx <= m)
    upd(i * 2, s, m, indx, val);
  else
    upd(i * 2 + 1, m + 1, e, indx, val);
  t[i] = min(t[i * 2], t[i * 2 + 1]);
}
long long query(int i, int s, int e, int l, int r) {
  if (s >= l & e <= r) {
    return t[i];
  }
  if (s > r || e < l) return LONG_LONG_MAX;
  int m = (s + e) / 2;
  return min(query(i * 2, s, m, l, r), query(i * 2 + 1, m + 1, e, l, r));
}
int main() {
  cin >> n >> e >> T;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long dp[n + 1];
  dp[n] = 0;
  dp[n - 1] = T;
  upd(1, 0, n - 1, n - 1, 2 * a[n - 1]);
  for (int i = n - 2; i >= 0; i--) {
    dp[i] = dp[i + 1] + T;
    long long sv = (T + 2LL * a[i] + 1) / 2LL;
    int indx = lower_bound(a + i, a + n, sv) - a;
    if (indx - 1 > i) dp[i] = min(dp[i], dp[indx - 1] + T);
    if (indx < n) dp[i] = min(dp[i], query(1, 0, n - 1, indx, n) - 2 * a[i]);
    upd(1, 0, n - 1, i, dp[i + 1] + 2 * a[i]);
  }
  cout << dp[0] + e << endl;
}
