#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int N, E, T;
int X[MAXN];
long long dp[MAXN];
long long dfs(int now) {
  long long& ret = dp[now];
  if (ret >= 0) return ret;
  if (now == N) return ret = 0;
  ret = 1ll << 60;
  for (int j = now; j < N; j++) {
    long long dist = X[j] - X[now];
    long long cost = (dist * 2 > T) ? dist * 3 : T + dist;
    ret = min(ret, cost + dfs(j + 1) + (X[j + 1] - X[j]));
  }
  return ret;
}
int main() {
  cin >> N >> E >> T;
  if (N > 2000) return 0;
  for (int i = 0; i < N; i++) cin >> X[i];
  X[N] = E;
  memset(dp, -1, sizeof(dp));
  cout << X[0] + dfs(0) << endl;
  return 0;
}
