#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007ll;
const double EPS = 1e-11;
int n, e;
long long t;
int x[125252];
long long dp[125252];
const long long INF = 1e18;
long long dfs(int p) {
  if (dp[p] != -1) return dp[p];
  dp[p] = INF;
  for (int to = (int)(p); to < (int)(n); ++to) {
    long long len = x[to] - x[p];
    long long add = max(t, 2ll * len);
    dp[p] = min((dp[p]), (add + len + x[to + 1] - x[to] + dfs(to + 1)));
  }
  return dp[p];
}
int main() {
  scanf("%d%lld%lld", &n, &e, &t);
  for (int i = 0; i < (int)(n); ++i) scanf("%d", x + i);
  x[n] = e;
  assert(n <= 2000);
  for (int i = 0; i < (int)(n); ++i) dp[i] = -1;
  dp[n] = 0;
  long long ans = dfs(0);
  printf("%lld\n", ans + x[0]);
  return 0;
}
