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