#include <bits/stdc++.h>
int main() {
  int n, t, e;
  std::cin >> n >> e >> t;
  if (n > 2000) {
    return 0;
  }
  std::vector<long long> d(n + 1, (long long)1e18);
  std::vector<long long> v(n + 1);
  for (int i = 0; i < n; i++) std::cin >> v[i];
  v[n] = e;
  d[0] = v[0];
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      d[j] = std::min(
          d[j], d[i] + std::max((v[j - 1] - v[i]) * 3, t + v[j - 1] - v[i]) +
                    v[j] - v[j - 1]);
    }
  }
  std::cout << d[n] << std::endl;
}
