#include <bits/stdc++.h>
using namespace std;
static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
void solve() {
  long long n, e, t;
  cin >> n >> e >> t;
  vector<long long> x(n);
  for (int i = 0; i < n; i++) cin >> x[i];
  vector<long long> dp(n, INFL);
  dp[0] = t;
  int now = 0;
  long long mi = -2 * x[0];
  for (int i = 1; i < n; i++) {
    while (2 * (x[i] - x[now + 1]) > t) {
      mi = min(mi, dp[now] - 2 * x[now + 1]);
      now++;
    }
    dp[i] = mi + 2 * x[i];
    dp[i] = min(dp[i], dp[now] + t);
  }
  cout << dp[n - 1] + e << endl;
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
