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