#include <bits/stdc++.h>
using namespace std;
const long long inf = 1LL << 61;
const long long mod = 1000000007;
const int max_n = 100010;
int n;
long long T, E;
long long dp[max_n], d[max_n], dp2[max_n], p[max_n];
int main() {
  int i = 0, j = 0, k = 0;
  long long ans;
  memset(d, 0, sizeof(d)), memset(dp, 0, sizeof(dp));
  memset(dp2, 0, sizeof(dp2)), memset(p, 0, sizeof(p));
  scanf("%d %I64d %I64d", &n, &E, &T);
  for (i = 1; i <= n; i++) {
    scanf("%I64d", d + i);
  }
  if (n == 1) {
    ans = E + T;
    printf("%I64d\n", ans);
    return 0;
  }
  int tp;
  for (i = 1; i <= n; i++) {
    for (tp = p[i - 1]; tp < i; tp++) {
      if (T > 2 * (d[i] - d[tp + 1])) break;
    }
    p[i] = tp;
  }
  dp[1] = T;
  dp2[1] = dp[1] - 2 * d[2];
  for (i = 2; i <= n; i++) {
    tp = p[i];
    dp[i] = max(T, 2 * (d[i] - d[1]));
    if (tp > 0) {
      ans = min(dp[tp] + T, 2 * d[i] + dp2[tp - 1]);
    } else {
      ans = dp[tp] + T;
    }
    dp[i] = min(dp[i], ans);
    if (i < n) dp2[i] = min(dp2[i - 1], dp[i] - 2 * d[i + 1]);
  }
  ans = dp[n] + E;
  printf("%I64d\n", ans);
  return 0;
}
