#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
const int N = 101000;
int n, e, t;
long long dp[N], x[N];
int main() {
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i < n + 1; i++) scanf("%lld", x + i);
  for (int i = 1; i < n + 1; i++) {
    dp[i] = 1ll << 60;
    for (int j = 0; j < i; j++)
      dp[i] = min(dp[i], dp[j] + x[j + 1] - x[j] +
                             max(2 * (x[i] - x[j + 1]), (long long)t) + x[i] -
                             x[j + 1]);
  }
  printf("%lld\n", dp[n] + e - x[n]);
}
