#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int x[maxn];
long long dp[maxn];
int main() {
  int n, e, t;
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%d", &x[i]);
  memset(dp, 0x3f, sizeof dp);
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < i; j++) {
      dp[i] = min(dp[i],
                  x[j + 1] - x[j] + dp[j] +
                      max(3ll * (x[i] - x[j + 1]), 1ll * x[i] - x[j + 1] + t));
    }
  }
  printf("%lld\n", dp[n] + e - x[n]);
  return 0;
}
