#include <bits/stdc++.h>
using namespace std;
long long f[101010];
long long x[101010];
long long E, T;
long long calc(int i, int j) {
  return max(f[j - 1] + T, f[j - 1] + 2 * x[i] - 2 * x[j]);
}
int main() {
  int n;
  cin >> n >> E >> T;
  for (int i = 1; i <= n; i++) cin >> x[i];
  for (int i = 1; i <= n; i++) {
    f[i] = f[i - 1] + T;
    int l = 1, r = n - 1;
    while (r - l > 2) {
      int m1 = (2 * l + r) / 3, m2 = (l + 2 * r + 2) / 3;
      if (calc(i, m1) < calc(i, m2))
        r = m2;
      else
        l = m1;
    }
    for (int j = l; j <= r; j++)
      f[i] = min(f[i], max(f[j - 1] + T, f[j - 1] + 2 * x[i] - 2 * x[j]));
  }
  cout << f[n] + E << endl;
  return 0;
}
