#include <bits/stdc++.h>
using namespace std;
using ulong = unsigned long;
using ll = long long;
const int M = 1e9 + 7;
#pragma unused(M)
int main() {
  int n, e, t;
  cin >> n >> e >> t;
  vector<ll> xs(n);
  for (int i = 0; i < n; i++) {
    cin >> xs[i];
  }
  ll ans = xs[0] + t, wait = t;
  for (int i = 1; i < n; i++) {
    ll dx = xs[i] - xs[i - 1];
    if (dx + t < 3 * dx - min(wait, 2 * dx)) {
      ans += dx + t;
      wait = t;
    } else {
      ans += 3 * dx - min(wait, 2 * dx);
      wait = 0;
    }
  }
  ans += e - xs.back();
  cout << ans << endl;
  return 0;
}
