#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000001;
const long long INF = 2e18 * 2;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int dx2[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dy2[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int main() {
  long long n, e, t, i, j, k;
  cin >> n >> e >> t;
  vector<long long> x(n + 1);
  for (i = 1; i <= n; i++) {
    cin >> x[i];
  }
  vector<vector<vector<long long> > > dp(
      n + 1, vector<vector<long long> >(n + 1, vector<long long>(2, INF)));
  dp[0][0][0] = dp[0][0][1] = 0;
  for (i = 0; i < n; i++) {
    for (j = i; j <= n; j++) {
      if (j != n) {
        dp[i][j + 1][1] = min(dp[i][j + 1][1], dp[i][j][1] + x[j + 1] - x[j]);
      }
      if (i != j) {
        dp[j][j][1] = min(dp[j][j][1], max(dp[i][j][1] + 2 * (x[j] - x[i + 1]),
                                           dp[i][j][1] + t));
      }
    }
  }
  cout << dp[n][n][1] + e - x[n] << endl;
}
