#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 = 0; i < N; i++) {
    cin >> X[i];
  }
  X[N] = E;
  vector<int64> dp1(N + 1, INF);
  dp1[0] = X[0];
  for (int i = 1; i <= N; i++) {
    for (int j = i - 1; j >= 0; j--) {
      int64 need = dp1[j] + (X[i - 1] + X[i - 1] - X[j] - X[j]);
      need = max(need, dp1[j] + T);
      dp1[i] = min(dp1[i], need + X[i] - X[j]);
    }
  }
  cout << dp1.back() << endl;
}
