#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int e, n, wait;
int pos[N];
long long f[N];
int main() {
  scanf("%d%d%d", &n, &e, &wait);
  for (int i = 1; i <= n; ++i) scanf("%d", &pos[i]);
  for (int i = 1; i <= n; ++i) f[i] = LLONG_MAX / 2;
  f[0] = 0;
  for (int now = 0; now < n; ++now) {
    int x = -1;
    for (int l = now + 1, r = n, mid = (l + r) >> 1; l <= r; mid = (l + r) >> 1)
      if (2 * (pos[mid] - pos[now + 1]) <= wait)
        x = mid, l = mid + 1;
      else
        r = mid - 1;
    long long tmp = 0;
    if (2 * (pos[x] - pos[now + 1]) <= wait) {
      tmp += 2ll * (pos[x] - pos[now + 1]);
      tmp += (long long)(wait - 2 * (pos[x] - pos[now + 1]));
      f[x] = min(f[x], f[now] + tmp);
    }
    if (x < n) {
      ++x;
      f[x] = min(f[x], f[now] + 2ll * (pos[x] - pos[now + 1]));
    }
    f[now + 1] = min(f[now + 1], f[now] + wait);
  }
  cout << f[n] + e;
}
