#include <bits/stdc++.h>
using namespace std;
const long long LINF = 334ll << 53;
const int INF = 15 << 26;
const long long MOD = 1E9 + 7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, e, t;
  cin >> n >> e >> t;
  vector<long long> dp(n + 1, LINF), x(n + 1);
  for (int(i) = 0; (i) < (n); ++(i)) cin >> x[i + 1];
  dp[0] = 0;
  dp[1] = t;
  int l = 0;
  long long r = 0;
  for (int(i) = (2); (i) < (n + 1); ++(i)) {
    dp[i] = dp[l] + (x[i] - x[l + 1]) * 2;
    for (int j = r; j < i; ++j) {
      if (t > (x[i] - x[j + 1]) * 2) {
        dp[i] = min(dp[i], dp[j] + t);
        r = j;
        break;
      }
    }
    if (dp[l] + (x[i] - x[l + 1]) * 2 > dp[i - 1]) l = i - 1;
  }
  cout << dp[n] + e << endl;
  return 0;
}
