#include <bits/stdc++.h>
using namespace std;
long long f[112345];
int n, pp, s, t, d[112345];
int main() {
  scanf("%d%d%d", &n, &s, &t);
  for (int i = 1; i <= n; i++) scanf("%d", &d[i]);
  pp = 1;
  long long mi = (1 << 31) - 1;
  f[0] = 0;
  for (int i = 1; i <= n; i++) {
    while (pp <= n && 2 * (d[i] - d[pp]) > t) {
      mi = min(mi, f[pp - 1] - d[pp] * 2);
      pp++;
    }
    f[i] = min(f[pp - 1] + t, mi + d[pp] * 2);
  }
  printf("%lld\n", s + f[n]);
}
