#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  int N;
  long long E, T;
  cin >> N >> E >> T;
  int i;
  vector<long long> x(N, 0);
  vector<long long> t(N, 0);
  for (i = 0; i < N; i++) {
    cin >> x[i];
    t[i] = T;
  }
  long long dist = x[0];
  long long d;
  d = x[0];
  for (i = 1; i < N; i++) {
    d = x[i] - x[i - 1];
    if (t[i - 1] <= d) {
      dist += t[i - 1] + d;
      t[i - 1] = 0;
    } else {
      dist += 2 * d;
      t[i - 1] -= 2 * d;
      if (t[i - 1] < 0) {
        t[i - 1] = 0;
      }
      dist += t[i - 1];
      dist += d;
      t[i] -= 2 * d;
      if (t[i] < 0) {
        t[i] = 0;
      }
      dist += t[i];
    }
  }
  dist += t[N - 1] + E - x[N - 1];
  cout << dist << endl;
  x.clear();
  t.clear();
  return 0;
}
