#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, E, T;
  cin >> N >> E >> T;
  vector<int> t;
  int pre_x, x, pre_t;
  pre_x = 0;
  long long ans = E;
  cin >> pre_x;
  ans += T;
  pre_t = T;
  for (int i = 1; i < N; i++) {
    cin >> x;
    if (x - pre_x >= T) {
      ans += T;
      pre_x = x;
      pre_t = T;
    } else {
      ans -= pre_t;
      pre_t = max(T, 2 * (x - pre_x));
      ans += pre_t;
    }
  }
  cout << ans << endl;
  return 0;
}
