#include <bits/stdc++.h>
using namespace std;
long long p[100005];
long long pp[100005];
int main() {
  int t;
  long long ppp, q;
  scanf("%d%lld%lld", &t, &q, &ppp);
  for (int i = 0; i <= t + 1; i++) {
    pp[i] = 1e15;
  }
  for (int i = 1; i <= t; i++) {
    scanf("%lld", &p[i]);
  }
  pp[0] = 0;
  pp[1] = p[1];
  p[t + 1] = q;
  for (int i = 1; i <= t; i++) {
    for (int j = i; j <= t; j++) {
      if (2 * (p[j] - p[i]) >= ppp)
        pp[j + 1] =
            min(pp[i] + 3 * (p[j] - p[i]) + (p[j + 1] - p[j]), pp[j + 1]);
      else
        pp[j + 1] = min(pp[i] + ppp + (p[j + 1] - p[i]), pp[j + 1]);
    }
  }
  printf("%lld", pp[t + 1]);
}
