#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const long long inf = (1ll << 63 - 1);
long long a[MAXN];
long long dp[MAXN];
int main() {
  long long n, e, t;
  cin >> n >> e >> t;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  memset(dp, (long long)0x3f3f3f3f, sizeof(dp));
  dp[0] = 0;
  long long mn = inf;
  for (int i = 1, now = 0; i <= n; i++) {
    while (t <= 2 * (a[i] - a[now + 1])) now++;
    mn = min(mn, dp[now] - 2 * a[now + 1]);
    if (now < i) dp[i] = min(dp[i], dp[now] + t);
    dp[i] = min(dp[i], mn + 2 * a[i]);
  }
  cout << e + dp[n] << endl;
  return 0;
}
