#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, inf = (1 << 30);
long long f[N];
int n, e, t, p[N];
int main() {
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  memset(f, 63, sizeof(f));
  f[0] = 0;
  long long mini = inf;
  for (int i = 1, j = 0; i <= n; i++) {
    for (; t <= (p[i] - p[j + 1]) << 1; j++)
      mini = min(mini, long long((p[i] - p[j + 1]) << 1));
    if (j < i) f[i] = min(f[i], f[j] + t);
    f[i] = min(f[i], f[i] + mini);
  }
  printf("%lld\n", f[n] + e);
  return 0;
}
