#include <bits/stdc++.h>
using namespace std;
int N, E, T, x[100009];
long long dp[100009], INF = 1LL << 50;
int main() {
  scanf("%d %d %d", &N, &E, &T);
  for (int i = 1; i <= N; i++) scanf("%d", &x[i]);
  for (int i = 1; i <= N; i++) {
    dp[i] = INF;
    for (int j = 1; j <= i; j++) {
      long long curr = dp[j - 1] + 3LL * (x[i] - x[j]) + x[j] - x[j - 1] +
                       (2 * (x[i] - x[j]) >= T ? 0 : T - 2 * (x[i] - x[j]));
      if (curr < dp[i]) dp[i] = curr;
    }
  }
  printf("%lld\n", dp[N] + E - x[N]);
  return 0;
}
