#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
int N, E, T;
int x[100010];
long long dp[100010];
int main() {
  scanf("%d%d%d", &N, &E, &T);
  for (int i = 1; i <= N; ++i) {
    cin >> x[i];
    dp[i] = INF;
  }
  for (int i = 1; i <= N; ++i) {
    for (int j = 0; j < i; ++j) {
      dp[i] = min(
          dp[i], dp[j] +
                     max(x[j + 1] - x[j] + T, (x[i] - x[j] + x[i] - x[j + 1])) +
                     x[i] - x[j + 1]);
    }
  }
  printf("%lld\n", dp[N] + E - x[N]);
  return 0;
}
