#include <bits/stdc++.h>
using namespace std;
using lint = long long;
template <class T = int>
using V = vector<T>;
template <class T = int>
using VV = V<V<T> >;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  lint E, T;
  cin >> E >> T;
  V<lint> x(n);
  for (auto&& e : x) cin >> e;
  lint p = 0;
  int i = 0;
  lint res = 0;
  while (true) {
    res += x[i] - p;
    p = x[i];
    while (i + 1 < n and x[i + 1] <= x[i] + T) ++i;
    lint d = x[i] - p;
    res += 3 * d + max<lint>(T - 2 * d, 0);
    p = x[i];
    if (++i == n) break;
  }
  res += E - p;
  cout << res << '\n';
}
