#include <bits/stdc++.h>
using namespace std;
long long t[1 << 20];
static long long dp[1 << 20];
static int pos[1 << 20];
static int s[1 << 20];
int n, S, T;
void U(int p, int u, int poz, long long val, int node) {
  if (p == u)
    t[node] = val;
  else {
    int m = (p + u) / 2;
    if (poz <= m)
      U(p, m, poz, val, node << 1);
    else
      U(m + 1, u, poz, val, node << 1 | 1);
    t[node] = min(t[node << 1], t[node << 1 | 1]);
  }
}
void update(int poz, long long val) { U(1, n + 1, poz + 1, val, 1); }
long long query(int p, int u, int l, int r, int node) {
  if (l > r) return (long long)(1e18);
  if (l <= p && u <= r) return t[node];
  int m = (p + u) / 2;
  long long ans = 1e18;
  if (l <= m) ans = min(ans, query(p, m, l, r, node << 1));
  if (m + 1 <= r) ans = min(ans, query(m + 1, u, l, r, node << 1 | 1));
  return ans;
}
long long query(int l, int r) { return query(1, n + 1, l + 1, r + 1, 1); }
int main(void) {
  srand(time(0));
  cout << fixed << setprecision(7);
  cerr << fixed << setprecision(7);
  cin >> n >> S >> T;
  for (int i = 1; i <= n; ++i) cin >> s[i];
  pos[0] = 0;
  for (int i = 0; i <= n; ++i) update(i, (long long)(1e18));
  for (int i = 1; i <= n; ++i) {
    pos[i] = pos[i - 1];
    while (T < 2ll * (s[i] - s[pos[i]])) ++pos[i];
  }
  dp[0] = 0;
  update(0, dp[0] - s[0] + T);
  for (int i = 1; i <= n; ++i) --pos[i];
  for (int i = 1; i <= n; ++i) {
    dp[i] = 1e18;
    for (int j = pos[i - 1]; j < pos[i]; ++j)
      update(j, dp[j] - s[j] - 2ll * s[j + 1]);
    dp[i] = min(query(0, pos[i] - 1) + 3ll * s[i],
                1ll * s[i] + query(pos[i], i - 1));
    update(i, dp[i] - s[i] + T);
  }
  cout << dp[n] + S - s[n] << '\n';
  cerr << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms"
       << '\n';
  return 0;
}
