#include <bits/stdc++.h>
using namespace std;
long long f[101010];
long long a[101010];
int main() {
  int n, e, t, now = 1;
  long long mi;
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  f[0] = 0;
  f[1] = t;
  for (int i = 2; i <= n; i++) {
    while ((a[i] - a[now]) * 2 > t) {
      mi = min(mi, f[now - 1] - 2 * a[now]);
      now++;
    }
    f[i] = f[now - 1] + t;
    f[i] = min(f[i], mi + 2 * a[i]);
  }
  printf("%lld", (long long)e + f[n]);
  return 0;
}
