#include <bits/stdc++.h>
using namespace std;
long long maxn = (1ll << 63 - 1);
long long a[10001], dp[10001] = {0};
long long n, e, t, k = 0;
int main() {
  memset(dp, 0x3f3f3f3f, sizeof(dp));
  cin >> n >> e >> t;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    while (t <= 2 * (a[i] - a[k + 1])) {
      maxn = min(maxn, dp[k] - 2 * a[k + 1]);
      k++;
    }
    dp[i] = dp[k] + t;
    dp[i] = min(dp[i], maxn + 2 * a[i]);
  }
  dp[n] += e;
  cout << dp[n] << endl;
}
