#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
mt19937 rnd(chrono::steady_clock().now().time_since_epoch().count());
const int N = 2002;
const long long inf = (long long)1e18;
long long dp[N];
long long x[N];
long long ab(long long x) { return max(x, -x); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  long long w, e;
  cin >> n >> e >> w;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    dp[i] = inf;
    for (int j = 1; j <= i; j++) {
      dp[i] =
          min(dp[i], dp[j - 1] + (x[i] - x[j - 1]) + max(w, 2 * (x[i] - x[j])));
    }
  }
  cout << dp[n] + (e - x[n]);
  return 0;
}
