#include <bits/stdc++.h>
using namespace std;
long long dp[100005], x[100005];
deque<int> q1, q2;
int n;
long long e, t;
void ins1(int xx) {
  while (!q1.empty() &&
         dp[q1.front()] - 2 * x[q1.front()] >= dp[xx] - 2 * x[xx])
    q1.pop_back();
  q1.push_back(xx);
}
void ins2(int xx) {
  while (!q2.empty() && dp[q2.front()] >= dp[xx]) q2.pop_back();
  q2.push_back(xx);
}
long long r1(int i) {
  if (!q1.empty())
    return dp[q1.front()] + 2 * (x[i] - x[q1.front() + 1]);
  else
    return 1e18;
}
long long r2(int i) {
  if (!q2.empty())
    return dp[q2.front()] + t;
  else
    return 1e18;
}
int main() {
  cin >> n >> e >> t;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    dp[i] = 1e18;
  }
  dp[0] = 0;
  q2.push_back(0);
  int l = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < i; j++) {
      while (l < i && 2 * (x[i] - x[l + 1]) >= t) {
        ins1(l);
        if (q2.front() == l) q2.pop_front();
        l++;
      }
      dp[i] = min(r1(i), r2(i));
      ins2(i);
    }
  }
  cout << e + dp[n];
  return 0;
}
