#include <bits/stdc++.h>
using namespace std;
set<pair<long long, long long> > s;
long long x[100008], dp[100008];
int main() {
  long long n;
  cin >> n;
  long long t, e;
  cin >> e >> t;
  for (long long i = 1; i <= n; i++) cin >> x[i], s.insert(make_pair(x[i], i));
  for (long long i = 0; i < 100005; i++) dp[i] = 2e9;
  dp[0] = 0;
  s.insert(make_pair(0, 0));
  for (long long i = 1; i <= n; i++) {
    int j;
    set<pair<long long, long long> >::iterator it =
        s.lower_bound(make_pair(x[i] - (t + 1) / 2, 0));
    if (it != s.end()) j = (*it).second;
    dp[i] = min(dp[i], dp[j] + max(t, 2 * (x[i] - x[j + 1])));
    --it;
    if (it != s.end() and (++it) != s.begin()) --it, j = (*it).second;
    dp[i] = min(dp[i], dp[j] + max(t, 2 * (x[i] - x[j + 1])));
    it = s.lower_bound(make_pair(x[i] - t, 0));
    if (it != s.end()) j = (*it).second;
    dp[i] = min(dp[i], dp[j] + max(t, 2 * (x[i] - x[j + 1])));
    --it;
    if (it != s.end() and (++it) != s.begin()) --it, j = (*it).second;
    dp[i] = min(dp[i], dp[j] + max(t, 2 * (x[i] - x[j + 1])));
  }
  cout << dp[n] + e;
}
