#include <bits/stdc++.h>
using namespace std;
long long n, e, t, f[10001], a[10001];
int main() {
  scanf("%lld%lld%lld", &n, &e, &t);
  for (int i = 1; i <= n; ++i) scanf("%lld", &a[i]);
  for (int i = 1; i <= n; ++i) {
    f[i] = f[i - 1] + (a[i] - a[i - 1]) + t;
    for (int j = i - 1; j >= 1; --j)
      f[i] = min(f[i], f[j - 1] + 3 * a[i] - 2 * a[j] - a[j - 1]);
  }
  printf("%lld\n", f[n] + e - a[n]);
}
