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