#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int inf = 1001001001;
constexpr ll INF = 3003003003003003003LL;
template <typename T>
inline bool chmin(T& x, const T& y) {
  if (x > y) {
    x = y;
    return 1;
  }
  return 0;
}
template <typename T>
inline bool chmax(T& x, const T& y) {
  if (x < y) {
    x = y;
    return 1;
  }
  return 0;
}
struct IOSET {
  IOSET() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(10);
  }
} ioset;
int main() {
  int n, e, t;
  cin >> n >> e >> t;
  vector<int> x(n);
  for (int i = 0; i < (int)(n); ++i) cin >> x[i];
  x.push_back(e);
  vector<ll> dp(n + 1, INF);
  dp[n] = 0;
  for (int i = (int)(n)-1; i >= 0; --i) {
    int sum = 0;
    for (int j = (int)(i); j < (int)(n); ++j) {
      if (j > i) sum += (x[j] - x[j - 1]) * 2;
      chmin(dp[i], dp[j + 1] + max(sum, t) + x[j + 1] - x[i]);
    }
  }
  cout << dp[0] + x[0] << "\n";
}
