#include <bits/stdc++.h>
using namespace std;
const long long mk = 100055;
const long long logn = 29;
const long long mod = 1e9 + 7;
int n, e, t, a[mk], dp[mk];
vector<int> g[mk];
void init() {
  cin >> n >> e >> t;
  for (int i = 1; i <= n; i++) cin >> a[i];
}
void solve() {
  dp[0] = 0;
  a[0] = 0;
  for (int i = 1; i <= n; i++) {
    dp[i] = INT_MAX;
    for (int j = 0; j < i; j++) {
      if (t > 2 * (a[i] - a[j + 1]))
        dp[i] = min(dp[i], dp[j] + a[i] - a[j] + t);
      else
        dp[i] = min(dp[i], dp[j] + 2 * (a[i] - a[j + 1]) + a[i] - a[j]);
    }
  }
  cout << dp[n] + e - a[n];
}
signed main() {
  init();
  solve();
}
