#include <bits/stdc++.h>
using namespace std;
long long x[100008], dp[100008];
long long t, e;
void update(long long i, long long j) {
  dp[i] = min(dp[i], dp[j] + max(t, 2 * (x[i] - x[j + 1])));
}
int main() {
  long long n;
  cin >> n;
  cin >> e >> t;
  for (long long i = 1; i <= n; i++) cin >> x[i];
  for (long long i = 0; i < 100005; i++) dp[i] = 2e9;
  x[n + 1] = 2e9;
  dp[0] = 0;
  long long j = 0;
  long long mst = 2e9, msi = 0;
  for (long long i = 1; i <= n; i++) {
    update(i, i - 1);
    while ((x[i] - x[j + 1]) * 2 > t and j < i - 1) {
      j++;
      long long tt = dp[j] + 2 * (x[n + 1] - x[j + 1]);
      if (tt < mst) mst = tt, msi = j;
    }
    update(i, j);
    update(i, max(j - 1, (long long)0));
    update(i, j + 1);
    update(i, msi);
  }
  cout << dp[n] + e;
}
