#include <bits/stdc++.h>
using namespace std;
template <typename T>
T &chmin(T &a, const T &b) {
  return a = min(a, b);
}
template <typename T>
T &chmax(T &a, const T &b) {
  return a = max(a, b);
}
const long long INF = 1e+18;
const long double EPS = 1e-15;
const long long MOD = 1000000007;
const long long dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1};
signed main() {
  long long n, e, t, x[100010] = {}, ind = 0, tmp = INF, dp[100010];
  cin >> n >> e >> t;
  for (long long i = 1; i <= n; i++) {
    cin >> x[i];
    dp[i] = INF;
  }
  dp[0] = 0;
  for (long long i = 1; i <= n; i++) {
    while ((x[i] - x[ind + 1]) * 2 >= t) {
      chmin(tmp, dp[ind] + (x[i] - x[ind + 1]) * 2);
      ind++;
    }
    dp[i] = min(tmp, dp[ind] + t);
    tmp += (x[i] - x[i - 1]) * 2;
  }
  cout << dp[n] + e << endl;
  return 0;
}
