#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9 + 123;
const long long infl = (long long)1e18 + 123;
const double eps = 1e-9;
const int MAX_N = (int)1e5 + 5;
const int mod = (int)1e9 + 7;
int n;
int t, e;
int x[MAX_N];
long long dp[MAX_N];
int main() {
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%d", &x[i]);
  x[0] = dp[0] = 0;
  for (int i = 1; i <= n; i++) dp[i] = infl;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      long long now = max(dp[i] + x[j] - x[i] + t,
                          dp[i] + x[j] - x[i] + 2ll * (x[j] - x[i + 1]));
      dp[j] = min(dp[j], now);
    }
  }
  printf("%lld\n", dp[n] + e - x[n]);
  return 0;
}
