#include <bits/stdc++.h>
using namespace std;
int n;
long long t, e;
long long x[100005];
long long dp[100005];
int main(void) {
  scanf("%d%lld%lld", &n, &e, &t);
  if (n >= 2001) return 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &x[i]);
  }
  for (int i = 0; i <= n; i++) {
    dp[i] = (long long)x[n] + n * t;
  }
  dp[0] = 0;
  int now = 0;
  for (int i = 0; i <= n; i++) {
    if (i > 0) {
      while (now < i) {
        long long ela = x[i] - x[now + 1];
        if (ela + x[i] - x[now + 1] >= t) {
          dp[i] = min(dp[i], dp[now] + (x[i] - x[now + 1]) * 2LL);
          now++;
        } else {
          long long rest = t - (ela + x[i] - x[now + 1]);
          dp[i] = min(dp[i], dp[now] + (x[i] - x[now + 1]) * 2LL + rest);
          break;
        }
      }
    }
  }
  printf("%lld\n", dp[n] + e);
  return 0;
}
