#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const double EPS = 1e-8;
const long long inf = 1e15;
vector<long long> dp, in;
long long n, e, t;
long long f(long long i, long long j) {
  return dp[j] + in[j + 1] - in[j] +
         max<long long>(t, 2 * (in[i + 1] - in[j + 1])) + in[i + 1] - in[j + 1];
}
int main() {
  cin >> n >> e >> t;
  in = vector<long long>(n + 1);
  for (int i = 0; i < n; i++) cin >> in[i + 1];
  dp = vector<long long>(n + 1, inf);
  dp[0] = 0;
  for (int i = 0; i < n; i++) {
    long long l = 0, r = i + 1;
    while (r - l > 5) {
      long long h1 = (r - l) / 3 + l;
      long long h2 = (r - l) / 3 * 2 + l;
      long long s1 = f(i, h1);
      long long s2 = f(i, h2);
      if (s1 > s2)
        l = h1;
      else
        r = h2;
    }
    long long mi = inf;
    for (int j = max<long long>(l - 5, 0); j < min<long long>(i, r + 5); j++)
      mi = min(mi, f(i, j));
    dp[i + 1] = mi;
  }
  cout << dp[n] + e - in[n] << endl;
}
