#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ld = double;
const ld EPS = 1e-7;
const ld PI = 3.141592653589793;
const int maxn = 300001;
void fast_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
}
signed main() {
  fast_io();
  cout.precision(6);
  cout << fixed;
  auto start = chrono::steady_clock::now();
  ll n, e, t;
  cin >> n >> e >> t;
  vector<ll> x(n);
  for (int i = 0; i < n; ++i) {
    cin >> x[i];
  }
  ll ans = x[0];
  for (int i = 0; i < n;) {
    int j = i;
    if (i) {
      ans += x[i] - x[i - 1];
    }
    while (j + 1 < n && x[j + 1] - x[i] <= t) {
      ++j;
    }
    ans += max(2 * (x[j] - x[i]), t) + (x[j] - x[i]);
    i = j + 1;
  }
  ans += e - x.back();
  cout << ans;
  auto end = chrono::steady_clock::now();
  42;
}
