#include <bits/stdc++.h>
const int N = 100100;
using namespace std;
int n;
int a[N];
long long d[N];
long long E, T;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> E >> T;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (n > 2020) {
    return 0;
  }
  long long inf = 1e18;
  for (int i = 1; i <= n; i++) {
    d[i] = inf;
    for (int j = 1; j <= i; j++) {
      long long D = a[i] - a[j];
      d[i] = min(d[i], d[j - 1] + D + max(D * 2, T) + a[j] - a[j - 1]);
    }
  }
  cout << d[n] + E - a[n] << "\n";
}
