#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, e, t;
  cin >> n >> e >> t;
  long long x[n + 1];
  for (long long i = 0; i < n; i++) cin >> x[i];
  if (n > 2000) assert(0);
  x[n] = e;
  long long dp[n + 1];
  long long INF = 1LL << 55LL;
  fill_n(dp, n + 1, INF);
  dp[0] = x[0];
  for (long long j = 0; j < n; j++) {
    long long res = dp[j + 1];
    for (long long i = 0; i <= j; i++) {
      long long tmp = max(2 * (x[j] - x[i]), t);
      tmp += x[j + 1] - x[i];
      res = min(res, dp[i] + tmp);
    }
    dp[j + 1] = res;
  }
  cout << dp[n] << endl;
  return 0;
}
