#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
const long long INF = 1e18;
int n, t, e, x[MAXN];
long long f[MAXN], val[MAXN];
struct cmpf {
  bool operator()(const int& i, const int& j) {
    if (val[i] != val[j]) return val[i] < val[j];
    return i < j;
  }
};
set<int, cmpf> s1, s2;
int main(void) {
  scanf("%d %d %d", &n, &e, &t);
  for (int i = (0); i < (n); ++i) scanf("%d", &x[i]);
  int j = n - 1;
  for (int i = n - 1; i >= 0; --i) {
    val[i] = f[i + 1] + t;
    s1.insert(i);
    for (; 2 * (x[j] - x[i]) > t; --j) {
      s1.erase(j);
      val[j] = f[j + 1] + 2 * (x[j] - x[i]);
      s2.insert(j);
    }
    f[i] = INF;
    if (!s1.empty()) f[i] = min(f[i], val[*s1.begin()]);
    if (!s2.empty()) f[i] = min(f[i], val[*s2.begin()]);
  }
  printf("%lld\n", f[0] + e);
  return 0;
}
