#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int n, t, e;
long long ans;
int xx[maxn];
inline long long max(long long aa, long long bb) {
  if (aa > bb)
    return aa;
  else
    return bb;
}
int main() {
  int b1, b2, b3, b4, b5;
  scanf("%d%d%d", &n, &e, &t);
  for (b1 = 1; b1 <= n; b1++) {
    scanf("%d", &xx[b1]);
  }
  xx[n + 1] = e;
  ans = xx[1];
  b1 = 1;
  while (b1 <= n) {
    b2 = b1;
    while ((b2 + 1 <= n) && ((long long)(xx[b2 + 1] - xx[b1]) * 2 <
                             (long long)t * (b2 - b1 + 2))) {
      b2++;
    }
    ans += max((long long)(xx[b2] - xx[b1]) * 2, (long long)t) +
           (long long)(xx[b2 + 1] - xx[b1]);
    b1 = b2 + 1;
  }
  printf("%lld\n", ans);
}
