#include <bits/stdc++.h>
using namespace std;
long long inf = (1ll << 63 - 1);
long long a[10005], dp[1005];
long long n, e, t, maxn = inf;
int main() {
  memset(dp, (long long)0x3f3f3f3f, sizeof(dp));
  cin >> n >> e >> t;
  for (int i = 1; i <= n; i++) cin >> a[i];
  dp[0] = 0;
  int t = 0;
  for (int i = 1; i <= n; i++) {
    while (t <= 2 * (a[i] - a[t + 1])) {
      maxn = min(maxn, dp[t] - 2 * a[t + 1]);
      t++;
    }
    dp[i] = dp[t] + t;
    dp[i] = min(dp[i], maxn + 2 * a[i]);
  }
  dp[n] += e;
  cout << dp[n] << endl;
}
