#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; i <= n; i++) {
    dp[i] = dp[i - 1] + x[i] - x[i - 1] + T;
    if (i == 1) continue;
    int l = 1, r = i - 1, res = 1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if ((x[i] - x[mid]) * 2 >= T) {
        res = mid;
        l = mid + 1;
      } else {
        r = mid - 1;
      }
    }
    dp[i] = min(dp[i], dp[res - 1] + x[res] - x[res - 1] + (x[i] - x[res]) * 3);
  }
  printf("%lld\n", dp[n] + E - x[n]);
  return 0;
}
