#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, e, t;
  cin >> n >> e >> t;
  vector<long long> a(n);
  for (long long i = (0); i < ((n)); i++) cin >> a[i];
  a.push_back(e);
  long long ans = a[0], cur = a[0], id = 0;
  while (id < n) {
    while (id + 1 < n && a[id + 1] - cur <= t) id++;
    ans += (a[id] - cur) * 3;
    ans += max(0LL, t - (a[id] - cur) * 2);
    ans += a[id + 1] - a[id];
    cur = a[++id];
  }
  cout << ans << endl;
  return 0;
}
