#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, E, T, pos;
int a[maxn];
long long f[maxn], mn = 1e18;
int main() {
  scanf("%d%d%d", &n, &E, &T);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    while (T < 2 * (a[i] - a[pos + 1])) {
      mn = min(mn, f[pos] - 2 * a[pos + 1]);
      pos++;
    }
    f[i] = min(f[i - 1] + T, mn + 2 * a[i]);
    if (pos < i - 1) f[i] = min(f[pos + 1] + T, f[i]);
  }
  printf("%lld\n", f[n] + E);
  return 0;
}
