#include <bits/stdc++.h>
using namespace std;
int _MAX(int a, int b) { return a > b ? a : b; }
int _MIN(int a, int b) { return a > b ? b : a; }
int a[100005];
int main() {
  int n, E, T;
  long long ans = 0;
  scanf("%d%d%d", &n, &E, &T);
  for (int i = 0; i < n; ++i) scanf("%d", a + i);
  ans += a[0];
  int i = 0, flag = 1;
  while (i < n - 1) {
    if (flag) {
      if ((long long)T >= (long long)2 * (a[i + 1] - a[i]))
        ans += (long long)T + a[i + 1] - a[i], flag = 0;
      else if (T >= a[i + 1] - a[i])
        ans += (long long)3 * (a[i + 1] - a[i]), flag = 0;
      else
        ans += (long long)(a[i + 1] - a[i]) + T, flag = 1;
    } else {
      ans += (long long)a[i + 1] - a[i], flag = 1;
    }
    ++i;
  }
  if (flag == 1) ans += T;
  ans += (long long)E - a[n - 1];
  printf("%lld\n", ans);
}
