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