#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC optimize("no-stack-protector,fast-math")
using namespace std;
const long long N = 3e5 + 100, OO = 1e16, T = 4500 + 100, M = 1e9 + 7, P = 6151,
                SQ = 280, lg = 30;
long long a[N], b[N], dp[N], sum[N];
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long n, e, t;
  cin >> n >> e >> t;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    if (i == 1) {
      dp[1] = t + a[1];
      sum[1] = a[1];
      continue;
    }
    for (long long j = 0; j < i; j++) {
      long long cnt = dp[j] + sum[j + 1] - sum[j] +
                      max(t, 2 * (sum[i] - sum[j + 1])) + sum[i] - sum[j + 1];
      dp[i] = min(dp[i], cnt);
    }
  }
  cout << e - a[n] + dp[n] << endl;
  return 0;
}
