#include <bits/stdc++.h>
using namespace std;
template <typename P, typename Q>
ostream& operator<<(ostream& os, pair<P, Q> p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
int main(int argc, char* argv[]) {
  const int N = 100000 + 10;
  int n;
  long long int e, t;
  while (cin >> n >> e >> t) {
    long long int x[N];
    for (int i = 0; i < n; ++i) {
      cin >> x[i];
    }
    x[n] = e;
    long long int dp[N];
    fill(dp, dp + N, 1LL << 60);
    dp[0] = 0;
    for (int i = 0, j = -1; i < n; ++i) {
      long long int mn = 1LL << 60;
      while (t < 2 * (x[i] - x[j + 1])) {
        mn = min(mn, dp[j] - 2 * x[j + 1]);
        ++j;
      }
      dp[i] = min(dp[j] + t, 2 * x[i] + mn);
    }
    cout << dp[n - 1] + e << endl;
  }
  return 0;
}
