#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using ui32 = unsigned int;
constexpr ll INFLL = 1e18;
void solve() {
  int n;
  ll e, t;
  cin >> n >> e >> t;
  vector<ll> x(n + 1, 0);
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
  }
  vector<ll> dp(n + 1, INFLL);
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < i; j++) {
      dp[i] =
          min(dp[i], dp[j] + (x[i] - x[j + 1]) * 3 +
                         max(0ll, t - 2 * (x[i] - x[j + 1])) + x[j + 1] - x[j]);
    }
  }
  cout << dp[n] + e - x[n] << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
