#include <bits/stdc++.h>
using namespace std;
long long x[200010];
long long dp[200010];
int main() {
  int n;
  long long e, t;
  cin >> n >> e >> t;
  for (int i = 1; i <= n; ++i) {
    cin >> x[i];
  }
  x[n + 1] = e;
  dp[1] = x[1];
  for (int i = 2; i <= n + 1; ++i) {
    dp[i] = 1LL << 60;
  }
  for (int i = 1; i <= n; ++i) {
    if (dp[i] == 1LL << 60) continue;
    int lo = i, hi = n + 1;
    for (int j = i; j <= n; ++j) {
      dp[j + 1] =
          min(dp[j + 1], dp[i] + 3 * (x[j] - x[i]) +
                             max(0LL, t - 2 * (x[j] - x[i])) + x[j + 1] - x[j]);
    }
  }
  cout << dp[n + 1];
}
