#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int n;
long long t, e, p[MAXN];
long long solve(int x) {
  if (x == n) return 0;
  int lo = x + 1, hi = n, mid;
  while (lo != hi) {
    mid = (lo + hi) / 2;
    if (3 * (p[mid] - p[x]) <= 2 * t + p[mid] - p[x])
      lo = mid + 1;
    else
      hi = mid;
  }
  long long ret = 0;
  if (lo == x + 1)
    ret = t;
  else
    ret = 3 * (p[lo - 1] - p[x]);
  ret += p[lo] - p[lo - 1];
  return ret + solve(lo);
}
int main() {
  scanf("%d %lld %lld", &n, &e, &t);
  for (int i = (0); i < int(n); i++) scanf("%lld", &p[i]);
  p[n] = e;
  printf("%lld\n", solve(0) + p[0]);
  return 0;
}
