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