#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 10, inf = 2e18;
long long e, n, t, x[maxn], dp[maxn], p[maxn];
int main() {
  cin >> n >> e >> t;
  for (int i = 0; i < n; i++) cin >> x[i];
  dp[0] = t;
  p[0] = dp[0] - 2 * x[1];
  for (int i = 1; i < n; i++) {
    int y = lower_bound(x, x + n, x[i] - (t / 2)) - x;
    if (y == 0)
      dp[i] = t;
    else if (y == 1)
      dp[i] = min(2 * t, 2 * (x[i] - x[0]));
    else
      dp[i] = min(p[y - 2] + 2 * x[i], dp[y - 1] + t);
    p[i] = min(p[i - 1], dp[i] - 2 * (x[i + 1]));
  }
  cout << dp[n - 1] + e;
}
