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