#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int N = 1E5 + 100;
const LL INF = 1E18;
int x[N];
LL f[N];
int main() {
  int n, e, t;
  cin >> n >> e >> t;
  for (decay<decltype(n + 1)>::type i = (1), _i = (n + 1); i < _i; ++i)
    cin >> x[i];
  for (decay<decltype(n + 1)>::type i = (1), _i = (n + 1); i < _i; ++i) {
    f[i] = INF;
    for (decay<decltype(i + 1)>::type j = (1), _j = (i + 1); j < _j; ++j) {
      f[i] = min(f[i], f[j - 1] + max(2 * (x[i] - x[j]), t) + x[i] - x[j - 1]);
    };
  }
  cout << f[n] + (e - x[n]) << endl;
}
