#include <bits/stdc++.h>
using namespace std;
int N, E, T;
int X[100001];
long long dp[100001];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> E >> T;
  for (int i = 1; i <= N; i++) cin >> X[i];
  for (int i = 0; i < int(N + 1); i++) dp[i] = (1LL << 60);
  dp[0] = 0;
  for (int i = 1; i <= N; i++) {
    for (int j = 0; j < i; j++) {
      dp[i] = min(dp[i], dp[j] + (X[i] - X[j]) + max(T, 2 * (X[i] - X[j + 1])));
    }
  }
  cout << dp[N] + (E - X[N]) << "\n";
  return 0;
}
