#include <bits/stdc++.h>
using namespace std;
int const N = 2e3 + 41;
long long const INF = 1e18;
long long x[N], d[N], t, e;
int n;
void remin(long long &a, long long b) { a = min(a, b); }
void solve() {
  cin >> n >> e >> t;
  assert(n < N);
  for (int i = 0; i < n; ++i) cin >> x[i];
  x[n] = e;
  for (int i = 0; i < N; ++i) d[i] = INF;
  d[0] = x[0];
  for (int i = 0; i < n; ++i)
    for (int j = i; j < n; ++j) {
      long long lt = d[i] + max(t, 2 * (x[j] - x[i]));
      long long rt = lt + x[j + 1] - x[i];
      remin(d[j + 1], rt);
    }
  cout << d[n] << endl;
}
int main() {
  solve();
  return 0;
}
