#include <bits/stdc++.h>
char B[1 << 15], *_S = B, *_T = B;
inline int F() {
  register char ch;
  register int cnt = 0;
  register bool minus = 0;
  while (
      ch = (_S == _T && (_T = (_S = B) + fread(B, 1, 1 << 15, stdin), _S == _T)
                ? EOF
                : *_S++),
      (ch < '0' || ch > '9') && ch != '-')
    ;
  ch == '-' ? minus = 1 : cnt = ch - '0';
  while (
      ch = (_S == _T && (_T = (_S = B) + fread(B, 1, 1 << 15, stdin), _S == _T)
                ? EOF
                : *_S++),
      ch >= '0' && ch <= '9')
    cnt = cnt * 10 + ch - '0';
  return minus ? -cnt : cnt;
}
int a[100010];
long long f[100010];
int main() {
  register int n = F(), E = F(), T = F();
  for (int i = 1; i <= n; ++i) a[i] = F();
  if (n > 2000) return 0;
  register long long ans = E;
  register int last = 1;
  for (int i = 1; i <= n; ++i) {
    f[i] = 1ll * i * T;
    for (int j = last; j <= i; ++j) {
      long long S = a[i] - a[j],
                temp = ((T - 2ll * S) > (0) ? (T - 2ll * S) : (0));
      (f[i] > (f[j - 1] + temp * (i - j + 1) + S * 2)
           ? f[i] = (f[j - 1] + temp * (i - j + 1) + S * 2)
           : 0)
          ? last = j
          : 0;
    }
  }
  printf("%lld\n", f[n] + ans);
  return 0;
}
