#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 2e18;
ll N, E, T;
ll x[100010];
ll dp[2010];
signed main() {
  while (cin >> N >> E >> T) {
    for (ll i = 0; i < (ll)(2010); i++) dp[i] = INF;
    for (ll i = 0; i < (ll)(N); i++) cin >> x[i];
    x[N] = E;
    dp[0] = 0;
    for (ll i = 0; i < (ll)(N); i++) {
      ll premove = x[i] - (i == 0 ? 0 : x[i - 1]);
      for (ll j = i; j < N; ++j) {
        ll dist = x[j] - x[i];
        ll cost = max(T, dist * 2) + dist;
        dp[j + 1] = min(dp[j + 1], dp[i] + premove + cost);
      }
    }
    cout << dp[N] + E - x[N - 1] << endl;
  }
}
