#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, e, t;
  cin >> n >> e >> t;
  if (n >= 2001) return 0;
  vector<long long> a(n + 1);
  a[0] = 0;
  for (int i = 0; i < (int)(n); ++i) {
    cin >> a[i + 1];
  }
  a.push_back(e);
  n += 2;
  vector<long long> dp(n, 1LL << 60);
  for (int i = 0; i < (int)(n); ++i) {
    if (i == 0) {
      dp[0] = 0;
      continue;
    }
    for (int j = 0; j < (int)(i - 1); ++j) {
      dp[i] = min(dp[i], dp[j] + (a[j + 1] - a[j]) +
                             max(3 * (a[i] - a[j + 1]), t + (a[i] - a[j + 1])));
    }
    if (i != n - 1) {
      dp[i] = min(dp[i], dp[i - 1] + a[i] - a[i - 1] + t);
    } else {
      dp[i] = min(dp[i], dp[i - 1] + a[i] - a[i - 1]);
    }
  }
  cout << dp[n - 1] << endl;
  return 0;
}
