#include <bits/stdc++.h>
using namespace std;
long long dp[108000];
long long x[108000];
long long l, n, e, t;
int main() {
  cin >> n >> e >> t;
  fill(dp, dp + 108000, (1LL << 60));
  dp[0] = 0;
  for (int i = 1; i <= n; i++) cin >> x[i];
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + t;
    while ((x[i] - x[l + 1]) * 2 >= t) l++;
    if (l == 0) continue;
    dp[i] = min(dp[i], dp[l - 1] + (x[i] - x[l]) * 2);
  }
  cout << e + dp[n] << endl;
  return 0;
}
