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