#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
const int64 INF = 1LL << 60;
int main() {
  int N, E, T, X[100001] = {};
  cin >> N >> E >> T;
  for (int i = 1; i <= N; i++) {
    cin >> X[i];
  }
  vector<int64> dp1(N + 1, INF);
  dp1[0] = 0;
  for (int i = 1; i <= N; i++) {
    for (int j = i - 1; j >= 0; j--) {
      int64 need = dp1[j];
      need += X[i] - X[j];
      need += X[i] - X[j + 1];
      need = max(need, dp1[j] + (X[j + 1] - X[j]) + T);
      need += X[i] - X[j + 1];
      dp1[i] = min(dp1[i], need);
    }
  }
  cout << dp1.back() + (E - X[N]) << endl;
}
