#include <bits/stdc++.h>
using namespace std;
const long long INF = 1145141919893810;
long long n, e, t;
long long x[100001];
long long dp[100001];
signed main() {
  long long i, j;
  cin >> n >> e >> t;
  x[0] = 0;
  for (i = 1; i <= n; i++) cin >> x[i];
  for (i = 0; i <= n; i++) dp[i] = INF;
  dp[0] = 0;
  for (i = 1; i <= n; i++) {
    long long st = 0, ed = i, mid;
    while (ed - st >= 2) {
      mid = (st + ed) / 2;
      if (2 * (x[i] - x[mid + 1]) > t)
        st = mid;
      else
        ed = mid;
    }
    dp[i] = min(dp[i], dp[st + 1] + t);
    dp[i] = min(dp[i], dp[st] + max(t, 2 * (x[i] - x[st + 1])));
  }
  cout << dp[n] + e << endl;
  return 0;
}
