#include <bits/stdc++.h>
using namespace std;
long long n, d[200010], t, e;
long long BN(long long key) {
  long long l = -1, r = n, m = (l + r) / 2;
  for (; l < r - 1; m = (l + r) / 2) {
    if (d[m + 1] * 2 < key)
      l = m;
    else
      r = m;
  }
  return l;
}
long long f[200010], g[200010];
int main() {
  cin >> n >> e >> t;
  for (long long i = 0; i < n; i++) cin >> d[i];
  for (long long i = 0; i < 200010; i++) f[i] = 1e18;
  f[0] = 0, g[0] = -2 * d[0];
  for (long long i = 1; i <= n; i++) {
    long long surf = BN(d[i - 1] * 2 - t);
    long long res = 1e17;
    if (surf + 1 < i) res = min(res, f[surf + 1] + t);
    ;
    if (~surf) res = min(res, g[surf] + 2 * d[i - 1]);
    ;
    f[i] = res;
    g[i] = min(g[i - 1], f[i] - 2 * d[i]);
  }
  cout << f[n] + e << endl;
  return 0;
}
