#include <bits/stdc++.h>
using namespace std;
ifstream fin("contest.in");
ofstream fout("contest.out");
long long n, e, t, x[100000 + 1], d, sum;
long long maxim(long long A, long long B) {
  if (A > B)
    return A;
  else
    return B;
}
int main() {
  cin >> n >> e >> t;
  for (int i = 1; i <= n; i++) cin >> x[i];
  sum = e;
  for (int i = 1; i < n; i++) {
    int ind = i + 1;
    d = x[ind] - x[i];
    while (d < t && ind <= n) {
      ind++;
      d = x[ind] - x[i];
    }
    ind--;
    if (i == ind && i == n - 1) sum += t;
    if (i == ind)
      sum += t;
    else {
      d = x[ind] - x[i];
      sum += maxim(t - 2 * d, 0) + 2 * d;
      i = ind;
    }
  }
  cout << sum;
  return 0;
}
