#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int main() {
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  int T, E;
  cin >> E >> T;
  long long dp[2002];
  int x[2002];
  for (int i = 1; i <= N; ++i) cin >> x[i];
  for (int i = 1; i <= N; ++i) {
    dp[i] = (long long)(T)*i + x[i];
  }
  for (int i = 2; i <= N; ++i) {
    for (int k = 0; k <= i - 1; ++k) {
      int j = k + 1;
      dp[i] = min(
          dp[i], dp[k] + x[j] - x[k] + max(T, (x[i] - x[j]) * 2) + x[i] - x[j]);
    }
  }
  cout << dp[N] + E - x[N] << endl;
  return 0;
}
