#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, e, t;
  cin >> n >> e >> t;
  vector<long long> x(n + 1, 0);
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
  }
  vector<long long> dp(n + 1, 10000000000);
  dp[0] = e;
  vector<int> p(n + 1);
  int l = 0;
  for (int i = 0; i <= n; i++) {
    while ((x[i] - x[l]) * 2 < t) l++;
    p[i] = l;
  }
  for (int i = 1; i <= n; i++) {
    long long mi = 10000000000;
    if (p[i] < i) mi = dp[p[i]] + t;
    for (int j = 0; j < l; j++) {
      mi = min(mi, dp[j] + 2 * (x[i] - x[j + 1]));
    }
    dp[i] = mi;
  }
  cout << dp[n] << endl;
  return 0;
}
