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