#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 25;
const long long INF = 1ll << 50;
const double pi = acos(-1);
const double eps = 1e-8;
const vector<int> emp;
long long n, e, t;
vector<long long> a;
int main() {
  cin >> n >> e >> t;
  a = vector<long long>(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long ans = a[0], now = a[0];
  for (int i = 0; i < n; i++) {
    while (i < n - 1 && a[i + 1] <= now + t) i++;
    long long tmp = a[i] - now;
    ans += (2 * tmp - t >= 0) ? 3 * tmp : t + tmp;
    now = a[i];
    if (i != n - 1) {
      ans += a[i + 1] - now;
      now = a[i + 1];
    }
  }
  cout << ans + e - a[n - 1] << endl;
}
