#include <bits/stdc++.h>
using namespace std;
const long long INF = LLONG_MAX / 4;
int main() {
  int n, e, t;
  cin >> n >> e >> t;
  vector<int> x(n + 1);
  for (int i = 0; i < n; ++i) cin >> x[i];
  x[n] = e;
  vector<long long> dp(n + 1, INF);
  dp[0] = x[0];
  int j = 0;
  long long tmp = INF;
  for (int i = 0; i < n; ++i) {
    while (j <= i && (x[i] - x[j]) * 2LL > t) {
      tmp = min(tmp, dp[j] - x[j] * 3LL);
      ++j;
    }
    dp[i + 1] = min(tmp + x[i] * 3LL, dp[j] + t) + (x[i + 1] - x[i]);
  }
  cout << dp[n] << endl;
  return 0;
}
