#include <bits/stdc++.h>
int main(void) {
  int N, E, T;
  scanf("%d%d%d", &N, &E, &T);
  int i, j, k = 0, num = 0, f = T;
  long long int x[N + 1];
  for (i = 0; i < N; i++) {
    scanf("%lld", &x[i]);
  }
  num = x[0];
  x[N] = E;
  for (i = 0; i < N; i++) {
    for (j = 1; i + j < N; j++) {
      if ((x[i + j] - x[i]) < T) {
        k += x[i + j] - x[i];
      } else {
        break;
      }
    }
    if (k != 0) {
      num += 3 * k + x[i + j] - x[i + j - 1];
      k = 0;
      f = 0;
      i = i + j - 1;
    } else {
      num += x[i + 1] - x[i] + f;
      f = T;
    }
  }
  printf("%d\n", num);
  return 0;
}
