#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long int e, t;
  cin >> n >> e >> t;
  if (n > 2000) return 0;
  long long int dp[100002], x[100002];
  dp[0] = 0;
  x[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
  }
  for (int i = 1; i <= n; i++) {
    dp[i] = 1e18;
    for (int j = 0; j < i; j++) {
      dp[i] = min(dp[i], dp[j] + 2 * (x[i] - x[j + 1]) + x[i] - x[j] +
                             max(t - 2 * (x[i] - x[j + 1]), 0ll));
    }
  }
  cout << dp[n] + e - x[n] << endl;
  return 0;
}
