#include <bits/stdc++.h>
using namespace std;
long long dp[2010];
const long long INF = 1e12;
signed main() {
  long long n, t, e;
  cin >> n >> e >> t;
  if (n > 2000) return 0;
  vector<long long> a(n + 1);
  a[0] = 0;
  for (long long i = 1; i < n + 1; i++) cin >> a[i];
  for (long long i = 0; i < 2010; i++) {
    dp[i] = INF;
  }
  dp[0] = a[0];
  for (long long i = 1; i < n + 1; i++) {
    for (long long j = i; j < n + 1; j++) {
      long long tmp = 2 * (a[j] - a[i]);
      tmp += tmp / 2;
      if (tmp < t) tmp += (t - tmp) * (j - i + 1);
      dp[j] = min(dp[j], dp[i - 1] + a[i] - a[i - 1] + tmp);
    }
  }
  cout << dp[n] + e - a[n] << endl;
}
