#include <bits/stdc++.h>
using namespace std;
int N, E;
long long T;
int x[100010];
long long dp[100010][2];
int main() {
  cin >> N >> E >> T;
  for (int i = 0; i < N; i++) cin >> x[i];
  for (int i = 0; i <= N; i++) {
    for (int j = 0; j < 2; j++) {
      dp[i][j] = 1LL << 60;
    }
  }
  dp[0][0] = x[0];
  dp[0][1] = x[0] + T;
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      long long d = abs(x[j] - x[i]);
      dp[j][0] = min(dp[j][0], dp[i][0] + d + T * (j - i));
      dp[j][0] = min(dp[j][0], dp[i][1] + d + T * (j - i - 1));
      dp[j][1] = min(dp[j][1], dp[j][0] + T);
      dp[j][1] = min(dp[j][1], dp[i][0] + max(2 * d, T) + d);
    }
  }
  cout << dp[N - 1][1] + E - x[N - 1] << "\n";
  return 0;
}
