#include <bits/stdc++.h>
using namespace std;
int n, p[2020];
long long d[2020];
int E, T;
void solve() {
  scanf("%d%d%d", &n, &E, &T);
  for (int i = 1; i <= n; i++) scanf("%d", p + i);
  for (int i = 1; i <= n; i++) {
    d[i] = 1e18;
    for (int j = 1; j <= i; j++) {
      d[i] =
          min(d[i], d[j - 1] + (p[i] - p[j - 1]) + max(T, 2 * (p[i] - p[j])));
    }
  }
  printf("%lld", (E - p[n]) + d[n]);
}
int main() {
  int Tc = 1;
  for (int tc = 1; tc <= Tc; tc++) {
    solve();
  }
  return 0;
}
