#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f;
const long long MAXN = 100000;
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               greater<pair<long long, long long> > >
    b1, b2;
long long add_val[100000 + 2];
signed main() {
  ios::sync_with_stdio(false);
  long long N;
  cin >> N;
  long long T, E;
  cin >> E >> T;
  long long dp[100000 + 2];
  long long x[100000 + 2];
  for (long long i = 1; i <= N; ++i) cin >> x[i];
  for (long long i = 1; i <= N; ++i) {
    dp[i] = (long long)(T)*i + x[i];
  }
  long long las = 0;
  long long all = 0;
  add_val[0] = dp[0] + x[1];
  add_val[1] = dp[1] + x[2] - x[1];
  b2.push(make_pair(dp[1] + x[2] - x[1], 1));
  b2.push(make_pair(dp[0] + x[1], 0));
  for (long long i = 2; i <= N; ++i) {
    all += 3 * (x[i] - x[i - 1]);
    while ((x[i] - x[las + 1]) * 2 > T) {
      b1.push(make_pair(add_val[las], las));
      las++;
    }
    while (!b2.empty() && b2.top().second < las) b2.pop();
    if (!b2.empty()) dp[i] = min(dp[i], b2.top().first + all / 3 + T);
    if (!b1.empty()) dp[i] = min(dp[i], b1.top().first + all);
    b2.push(make_pair(
        dp[i] + x[i + 1] - x[i] - (all + (x[i + 1] - x[i]) * 3) / 3, i));
    add_val[i] = dp[i] + x[i + 1] - x[i] - (all + (x[i + 1] - x[i]) * 3);
  }
  cout << dp[N] + E - x[N] << endl;
  return 0;
}
