#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, x, y, t, a[100010];
long long f[100010];
int E, T;
long long work(int x, int y) {
  if ((a[y] - a[x + 1]) * 2 >= T)
    return 3ll * (a[y] - a[x + 1]);
  else
    return T + a[y] - a[x + 1];
}
int main() {
  scanf("%d%d%d", &n, &E, &T);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) f[i] = 1ll << 60;
  for (i = 0; i < n; i++) {
    for (j = i + 1; j <= n; j++)
      f[j] = min(f[j], f[i] + a[i + 1] - a[i] + work(i, j));
  }
  printf("%lld\n", f[n] + E - a[n]);
  return 0;
}
