#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, E, T;
  scanf("%d%d%d", &N, &E, &T);
  long long bears[N + 1];
  bears[0] = 0;
  for (int i = 0; i < N; i++) scanf("%lld", &bears[i + 1]);
  N++;
  long long DP[N + 1][N + 1];
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      DP[i][j] = 0xffffffffffffLL;
    }
  }
  DP[0][0] = 0;
  for (int j = 0; j < N; j++) {
    for (int i = 1; i < N; i++) {
      DP[j][i] = min(DP[j][i], DP[j][i - 1] + bears[i] - bears[i - 1]);
    }
    for (int i = j; i < N; i++) {
      long long ct = DP[j][i];
      long long nt = ct + bears[i] - bears[j + 1];
      if (T > (bears[i] - bears[j + 1]) * 2) {
        nt += T;
      } else {
        nt += bears[i] - bears[j + 1];
      }
      DP[i][i] = min(DP[i][i], nt);
    }
  }
  printf("%lld\n", DP[N - 1][N - 1] + E - bears[N - 1]);
}
