#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]);
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[l[i]] + max(2 * (x[i] - x[l[i] + 1]), t);
    while (l[i] + 1 < i &&
           dp[l[i] + 1] + max(2 * (x[i] - x[l[i] + 2]), t) < dp[i]) {
      dp[i] = dp[l[i] + 1] + max(2 * (x[i] - x[l[i] + 2]), t);
      l[i]++;
    }
  }
  printf("%lld\n", dp[n] + e);
  return 0;
}
