#include <bits/stdc++.h>
using namespace std;
long long n, d[2010], t, e;
long long g(long long l, long long r) {
  long long dis = d[r] - d[l];
  long long ans = d[l] - d[l - 1] + dis;
  ans += max(dis * 2, t);
  return ans;
}
long long f[2010];
int main() {
  cin >> n >> e >> t;
  d[0] = 0;
  for (long long i = 0; i < n; i++) cin >> d[i + 1];
  if (n > 2010) return 0;
  for (long long i = 0; i < 2010; i++) f[i] = 1e18;
  f[0] = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j <= n; j++) {
      f[j] = min(f[j], f[i] + g(i + 1, j));
      ;
    }
  }
  cout << f[n] + e - d[n] << endl;
  return 0;
}
