#include <bits/stdc++.h>
using namespace std;
long long n, e, T;
long long x[110000];
long long ans;
int main() {
  scanf("%lld%lld%lld", &n, &e, &T);
  for (int i = 1; i <= n; i++) scanf("%lld", x + i);
  ans = x[1];
  long long now = 1;
  while (now <= n) {
    long long tt = 0;
    while ((now + tt < n) &&
           (x[now + tt + 1] - x[now] + (tt + 2) * T >=
            max((x[now + tt + 1] - x[now]) * 3, x[now + tt + 1] - x[now] + T)))
      tt++;
    ans += max((x[now + tt] - x[now]) * 3, x[now + tt] - x[now] + T);
    now += tt + 1;
    if (now <= n) ans += x[now] - x[now - 1];
  }
  printf("%lld\n", ans + e - x[n]);
  return 0;
}
