#include <bits/stdc++.h>
using namespace std;
using ulong = unsigned long;
using ll = long long;
const int M = 1e9 + 7;
#pragma unused(M)
int n, e, t;
vector<ll> xs;
ll solve(int pos, int time) {
  if (pos == 0) {
    return xs[0] + max(0, t - time);
  }
  ll dx = xs[pos] - xs[pos - 1];
  return min(solve(pos - 1, 0) + dx + max(0, (t - time)),
             solve(pos - 1, 2 * dx) + 3 * dx);
}
int main() {
  cin >> n >> e >> t;
  vector<ll> xs(n);
  for (int i = 0; i < n; i++) {
    cin >> xs[i];
  }
  ::xs = xs;
  cout << solve(n - 1, 0) + e - xs.back() << endl;
  return 0;
}
