#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, e, t;
  cin >> n >> e >> t;
  vector<long long int> x(n);
  for (long long int i = 0; i < (n); i++) cin >> x[i];
  vector<vector<long long int>> memo(n, vector<long long int>(n, pow(10, 10)));
  for (long long int i = 0; i < (n); i++) {
    for (long long int j = i + 1; j < n; j++) {
      long long int cost1 = t + x[j] - x[i] + (j - i + 1) * t;
      long long int cost2 =
          3 * (x[j] - x[i]) + 2 * max(t - 2 * (x[j] - x[i]), 0LL);
      memo[i][j] = min(cost1, cost2);
    }
  }
  for (long long int i = 0; i < (n); i++) {
    for (long long int j = i + 1; j < n - 1; j++) {
      for (long long int k = j + 1; k < n; k++) {
        memo[i][k] = min(memo[i][k], memo[i][j] + memo[j][k] - t);
      }
    }
  }
  cout << x[0] + memo[0][n - 1] + (e - x[n - 1]) - (n - 2) * t << endl;
  return 0;
}
