#include <bits/stdc++.h>
using namespace std;
const pair<int, int> four_Dir[4] = {{0, -1}, {-1, 0}, {0, 1}, {1, 0}};
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
signed main() {
  long long n, e, t;
  scanf("%lld %lld %lld", &n, &e, &t);
  vector<long long> bear(n);
  for (int i = (0); (n) > i; i++) {
    scanf("%lld", &bear[i]);
  }
  long long time = 0;
  for (int i = (0); (n) > i; i++) {
    if (i == n - 1) {
      time += t;
    }
    for (int j = (i + 1); (n) > j; j++) {
      if ((bear[j] - bear[i]) > t) {
        time += max(2 * (bear[j - 1] - bear[i]), t);
        i = j - 1;
        break;
      } else if (j == n - 1) {
        time += max(2 * (bear[j] - bear[i]), t);
        i = j;
      }
    }
  }
  printf("%lld\n", time + e);
  return 0;
}
