#include <bits/stdc++.h>
using namespace std;
long long dp[200100];
int x[200100];
int main() {
  int n, e, t, l;
  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] + max(2 * (x[i] - x[l + 1]), t);
    while (l + 1 < i && dp[l + 1] + max(2 * (x[i] - x[l + 2]), t) < dp[i]) {
      dp[i] = dp[l + 1] + max(2 * (x[i] - x[l + 2]), t);
      l++;
    }
  }
  printf("%lld\n", dp[n] + e);
  return 0;
}
