#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const long long INF = 1LL << 39;
const long long mod = 1e9 + 7;
template <class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  int n = v.size();
  for (int(i) = 0; (i) < (long long)(n); ++(i))
    os << v[i] << (i == n - 1 ? "" : " ");
  return os;
}
long long n, e, t;
long long x[100010], dp[100010];
int main() {
  cin >> n >> e >> t;
  for (int(i) = 0; (i) < (long long)(n); ++(i)) cin >> x[i];
  fill(dp, dp + 100010, INF);
  dp[0] = 0;
  for (int(i) = 0; (i) < (long long)(n); ++(i)) {
    long long r = upper_bound(x, x + n, x[i] + t / 2) - x;
    if (r < n) {
      long long d = x[r] - x[i];
      (dp[r + 1] = min(dp[r + 1], dp[i] + 2 * d + max(t - 2 * d, 0LL)));
    }
    r--;
    if (r >= i) {
      long long d = x[r] - x[i];
      (dp[r + 1] = min(dp[r + 1], dp[i] + 2 * d + max(t - 2 * d, 0LL)));
    }
  }
  cout << dp[n] + e << endl;
  return 0;
}
