#include <bits/stdc++.h>
int N, T, E, x[100009];
long long dp[100009];
int main() {
  scanf("%d %d %d", &N, &E, &T);
  for (int i = 0; i < N; i++) scanf("%d", &x[i]);
  int pl = 0;
  for (int i = 0; i < N; i++) {
    while (x[pl] + T / 2 < x[i]) pl++;
    dp[i + 1] = dp[pl] + T;
    for (int j = 0; j < pl; j++) {
      long long val = dp[j] + (x[i] - x[j]) * 2;
      if (dp[i + 1] > val) dp[i + 1] = val;
    }
  }
  printf("%lld\n", dp[N] + E);
  return 0;
}
