#include <bits/stdc++.h>
using namespace std;
int N;
long long E, T;
long long x[200000];
long long dp[200000];
int main() {
  scanf("%d%lld%lld", &N, &E, &T);
  for (int i = 0; i < N; i++) scanf("%lld", &x[i]);
  dp[N - 1] = T;
  for (int i = N - 2; i >= 0; i--) {
    dp[i] = x[N - 1] - x[i] + max(2 * (x[N - 1] - x[i]), T);
    for (int j = i; j + 1 < N; j++) {
      long long cost = (x[j] - x[i]) + max(2 * (x[j] - x[i]), T);
      cost += x[j + 1] - x[j];
      dp[i] = min(dp[i], dp[j + 1] + cost);
    }
  }
  long long res = dp[0] + x[0] + E - x[N - 1];
  printf("%lld\n", res);
}
