#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[200000];
  long long dp[200000];
  priority_queue<pair<long long, long long> > q;
  for (int i = 0; i < int(200000); i++) {
    a[i] = 0;
    dp[i] = 0;
  }
  int n, k;
  long long x, y, z;
  long long s, ans, t;
  bool v = true;
  ans = 0;
  scanf("%d %lld %lld", &n, &s, &t);
  ans = s;
  for (int i = 0; i < int(n); i++) {
    scanf("%lld", &a[i]);
  }
  if (n == 1) {
    printf("%lld\n", s + t);
    return 0;
  }
  dp[0] = t;
  q.push(make_pair(a[1] - dp[0], a[1]));
  q.push(make_pair(a[0], a[0]));
  s = 100000000000000000;
  for (int i = 1; i < n; i++) {
    while (true) {
      x = -q.top().first;
      y = q.top().second;
      if ((a[i] - y) > t) {
        s = min(s, x - y);
        q.pop();
      } else
        break;
    }
    x = -q.top().first;
    dp[i] = min(t + x + a[i], s + (2 * a[i]));
    if (i < n - 1) q.push(make_pair(a[i + 1] - dp[i], a[i + 1]));
  }
  ans += dp[n - 1];
  printf("%lld\n", ans);
  return 0;
}
