#include <bits/stdc++.h>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
int x[100010];
long long f[100010];
int main() {
  int n = gi(), E = gi(), T = gi();
  for (int i = 1; i <= n; ++i) x[i] = gi();
  x[++n] = E;
  for (int i = n - 1; i; --i) {
    f[i] = 9e18;
    for (int j = i; j < n; ++j)
      f[i] = std::min(
          f[i], f[j + 1] + x[j + 1] - x[i] + std::max(T, 2 * (x[j] - x[i])));
  }
  printf("%lld\n", f[1] + x[1]);
  return 0;
}
