#include <bits/stdc++.h>
int main(void) {
  int n, e, t;
  long long int x[100005];
  long long int total = 0;
  int now = 0;
  std::cin >> n >> e >> t;
  for (int i = 1; i <= n; i++) {
    std::cin >> x[i];
  }
  for (int i = 1; i <= n; i++) {
    int nnext = i;
    while (1) {
      if (x[nnext + 1] - x[i] <= t and nnext != n) {
        nnext++;
      } else
        break;
    }
    total += (x[i] - now) +
             ((0) < (t - 2 * (x[nnext] - x[i])) ? (t - 2 * (x[nnext] - x[i]))
                                                : (0)) +
             3 * (x[nnext] - x[i]);
    i = nnext;
    now = x[nnext];
  }
  std::cout << (total + e - x[n]) << std::endl;
  return 0;
}
