#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
const long long INF = 1e18;
long long f[N];
int x[N];
int n, T, E;
long long calc(int j, int i) {
  long long ret = x[i] - x[j + 1] + f[j];
  ret += max(x[i] - x[j] + x[i] - x[j + 1], x[j + 1] - x[j] + T);
  return ret;
}
int main() {
  scanf("%d %d %d", &n, &E, &T);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x[i]);
  }
  for (int i = 1; i <= n; i++) {
    f[i] = INF;
    for (int j = max(0, i - 150000000 / n); j < i; j++) {
      f[i] = min(f[i], calc(j, i));
    }
  }
  cout << f[n] + E - x[n] << endl;
  return 0;
}
