#include <bits/stdc++.h>
using namespace std;
long long int N;
long long int E;
long long int T;
long long int dp[200001];
long long int place[200001];
long long int min(long long int a, long long int b) {
  if (a > b) return b;
  return a;
}
long long int max(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
int main() {
  cin >> N >> E >> T;
  for (int i = 1; i <= N; i++) cin >> place[i];
  for (int i = 1; i <= N; i++) {
    dp[i] = ULONG_MAX;
  }
  dp[0] = 0;
  for (int i = 1; i <= N; i++) {
    dp[i] = min(max(place[i] + (place[i] - place[1]) * 2, T + place[i]),
                T * i + place[i]);
  }
  for (int i = 0; i <= N; i++) {
    for (int j = max(i, 1); j <= N; j++) {
      dp[j] = min(dp[j], dp[i] + max((place[j] - place[i]) * 3,
                                     T + place[j] - place[i]));
      dp[j] = min(dp[j], dp[j - 1] + T + place[j] - place[j - 1]);
    }
  }
  cout << dp[N] + E - place[N] << "\n";
  return 0;
}
