#include <bits/stdc++.h>
using namespace std;
long long dp[200100];
int l[200100], x[200100];
int main() {
  int n, e, t;
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%d", &x[i]);
  l[n + 1] = n;
  for (int i = n; i >= 1; i--) {
    l[i] = min(i, l[i + 1]);
    while (l[i] > 0 && 2 * (x[i] - x[l[i]]) <= t) l[i]--;
  }
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    if (l[i])
      dp[i] = min(dp[l[i]] + t, dp[l[i] - 1] + 2 * (x[i] - x[l[i]]));
    else
      dp[i] = t;
  }
  printf("%lld\n", dp[n] + e);
  return 0;
}
