#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:60777216")
using namespace std;
int n, e, t;
int x[222222];
long long r[222222];
int p[222222];
int main() {
  cin >> n >> e >> t;
  if (n > 10000) return 0;
  for (int i = (0); i < (n); i++) scanf("%d", x + i + 1);
  for (int i = (1); i < (n + 1); i++) {
    r[i] = 1e18;
    for (int prev = (p[i - 1]); prev < (i); prev++) {
      int diff = x[i] - x[prev + 1];
      diff *= 2;
      if (r[i] > r[prev] + max(diff, t)) {
        r[i] = r[prev] + max(diff, t);
        p[i] = prev;
      }
      if (diff < t) break;
    }
  }
  cout << r[n] + e << endl;
  return 0;
}
