#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const double PI2 = 8.0 * atan(1.0);
int N, E, T;
int x[100001];
int main(int argc, char **argv) {
  cin >> N >> E >> T;
  for (int i = 0; i < (int)N; ++i) cin >> x[i];
  x[N] = E;
  long long c = 0, t = x[0];
  while (c < N) {
    cerr << t << endl;
    int r = c;
    while (r < N - 1 && x[r + 1] - x[c] < T) ++r;
    t += max(T, (x[r] - x[c]) * 2);
    t += x[r + 1] - x[c];
    c = r + 1;
  }
  cout << t << endl;
  return 0;
}
