#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, e, t;
  cin >> n >> e >> t;
  vector<long long int> x(n + 1);
  vector<long long int> y(n + 1, 0);
  x[0] = 0;
  for (long long int i = 1; i < n + 1; i++) {
    cin >> x[i];
  }
  long long int c = 0;
  for (long long int i = 1; i < n + 1; i++) {
    if (y[i] == 0) {
      c += x[i] - x[i - 1];
      long long int m = t;
      long long int m2 = 0;
      long long int m3 = t;
      for (long long int j = 1; i + j < n + 1; j++) {
        m += (x[i + j] - x[i + j - 1]);
        m += t;
        m2 = (x[i + j] - x[i]) * 3;
        if (m2 <= m) {
          m3 = m2;
          y[i + j] = 1;
        } else {
          break;
        }
      }
      c += m3;
    }
  }
  c += e - x[n];
  cout << c << endl;
  return 0;
}
