#include <bits/stdc++.h>
using namespace std;
int N;
long long E, T;
int X[101010];
int Y[101010];
long long YY[101010];
long long dp[101010][2];
int main() {
  cin >> N >> E >> T;
  for (int i = 0; i < N; i++) scanf("%d", &X[i]);
  X[N] = E;
  for (int i = 0; i < N; i++) Y[i + 1] = X[i + 1] - X[i];
  Y[0] = X[0];
  YY[0] = Y[0];
  for (int i = 1; i < N + 1; i++) YY[i] = Y[i] + YY[i - 1];
  for (int i = 0; i < N + 1; i++) dp[i][0] = dp[i][1] = 1LL << 60;
  dp[0][0] = Y[0];
  dp[0][1] = Y[0] + T;
  for (int i = 1; i < N + 1; i++) {
    for (int j = 0; j < i; j++) {
      dp[i][0] = min(dp[i][0], dp[j][0] + (YY[i] - YY[j]) + T * (i - j));
      dp[i][0] = min(dp[i][0], dp[j][1] + (YY[i] - YY[j]) + T * (i - j - 1));
      dp[i][1] = min(dp[i][1], dp[j][0] + (YY[i] - YY[j]) + T * (i - j + 1));
      dp[i][1] = min(dp[i][1], dp[j][1] + (YY[i] - YY[j]) + T * (i - j));
      dp[i][1] = min(dp[i][1], dp[j][0] + (YY[i] - YY[j]) * 3);
    }
  }
  cout << dp[N][0] << endl;
}
