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