#include <bits/stdc++.h>
using namespace std;
long long f[112345];
int n, pp, s, t, d[112345];
int main() {
  scanf("%d%d%d", &n, &s, &t);
  for (int i = 1; i <= n; i++) scanf("%d", &d[i]);
  pp = 0;
  f[0] = 0;
  for (int i = 1; i <= n; i++) {
    f[i] = max(2 * (d[i] - d[1]), t);
    while (2 * (d[i] - d[pp + 1]) > t) {
      f[i] = min(f[i], f[pp] + 2 * (d[i] - d[pp + 1]));
      pp++;
    }
    if (f[pp] + t < f[i])
      f[i] = f[pp] + t;
    else if (pp > 0)
      pp--;
  }
  printf("%lld\n", s + f[n]);
}
