#include <bits/stdc++.h>
const int maxn = 1e5 + 20;
int N, E, T;
int x[maxn];
long long f[maxn];
int main() {
  scanf("%d%d%d", &N, &E, &T);
  for (int i = 1; i <= N; i++) {
    scanf("%d", &x[i]);
  }
  for (int i = 1; i <= N; i++) f[i] = 1e18;
  for (int i = 1, j = 1; i <= N; i++) {
    while (j <= N && x[j] - x[i] <= T) j++;
    f[j] = std::min(f[j], f[i - 1] + 2 * (x[j] - x[i]));
    f[j - 1] = std::min(f[j - 1], f[i - 1] + T);
    f[i] = std::min(f[i], f[i - 1] + T);
  }
  printf("%lld\n", f[N] + E);
  return 0;
}
