#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2010;
long long dist[MAXN][MAXN];
int main() {
  long long N, E, T;
  cin >> N >> E >> T;
  vector<long long> x;
  x.push_back(0);
  for (int i = 0; i < N; i++) {
    long long y;
    cin >> y;
    x.push_back(y);
  }
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j <= N; j++) {
      dist[i][j] = x[j] - x[i];
      dist[i][j] += max(T, (x[j] - x[i + 1]) * 2);
    }
  }
  long long INF = 1000000;
  INF *= INF * INF;
  long long ret = INF;
  vector<long long> ans(N + 1, INF);
  ans[0] = 0;
  for (int i = 1; i <= N; i++) {
    for (int j = 0; j < i; j++) {
      ans[i] = min(ans[i], ans[j] + dist[j][i]);
    }
  }
  cout << ans[N] + (E - x[N]) << endl;
  return 0;
}
