#include <bits/stdc++.h>
using namespace std;
long long f[100005];
int x[100005], n, t, e;
int main() {
  memset(f, 0x3f, sizeof(f));
  f[0] = 0;
  scanf("%d%d%d", &n, &e, &t);
  for (int i = (1); i <= (n); ++i) scanf("%d", &x[i]);
  for (int i = (0); i < (n); ++i) {
    for (int j = (i + 1); j <= (n); ++j) {
      f[j] = min(f[j], f[i] + x[i + 1] - x[i] + max((x[j] - x[i + 1]) * 2, t) +
                           x[j] - x[i + 1]);
    }
  }
  cout << f[n] + e - x[n] << endl;
  return 0;
}
