#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll dfs[2345][2];
ll n, e, t;
ll x[2345];
ll dist[2345];
int main(void) {
  scanf("%lld %lld %lld", &n, &e, &t);
  for (int i = 0; i < n; ++i) scanf("%d", x + i);
  dist[0] = x[0];
  for (int i = 1; i < n; ++i) {
    dist[i] = x[i] - x[i - 1];
  }
  dist[n] = e - x[n - 1];
  dfs[0][0] = 0;
  dfs[0][1] = 0;
  for (int i = 1; i <= n; ++i) {
    dfs[i][0] = dfs[i - 1][1] + dist[i - 1];
    ll small = dfs[i][0] + t;
    ll rui = 0;
    for (int j = i - 1; j >= 0; --j) {
      rui += dist[j];
      small = min(small, dfs[j][0] + max(rui * 3, rui + t));
    }
    dfs[i][1] = small;
  }
  printf("%lld\n", dfs[n][1] + dist[n]);
  return 0;
}
