#include <bits/stdc++.h>
using namespace std;
const long long INF = 1145141919893810;
long long n, e, t;
long long x[2001];
long long dp[2001];
signed main() {
  long long i, j;
  cin >> n >> e >> t;
  x[0] = 0;
  for (i = 1; i <= n; i++) cin >> x[i];
  for (i = 0; i <= n; i++) dp[i] = INF;
  dp[0] = 0;
  for (i = 0; i < n; i++) {
    for (j = i + 1; j <= n; j++) {
      long long cst;
      if (2 * (x[j] - x[i + 1]) > t) {
        cst = 3 * (x[j] - x[i + 1]) + (x[i + 1] - x[i]);
      } else {
        cst = t + x[j] - x[i];
      }
      dp[j] = min(dp[j], dp[i] + cst);
    }
  }
  cout << dp[n] + e - x[n] << endl;
  return 0;
}
