#include <bits/stdc++.h>
using namespace std;
const long long Inf = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, e, t;
  cin >> n >> e >> t;
  vector<int> x(n + 1);
  for (int i = 0; i < n; ++i) cin >> x[i + 1];
  x[0] = 0;
  vector<long long> dp(n + 1, Inf);
  dp[0] = 0;
  for (int i = 0; i < n; ++i) {
    long long go = 0;
    for (int j = i + 1; j <= n; ++j) {
      go += x[j] - x[j - 1];
      dp[j] = min(dp[j], dp[i] + go + (long long)t * (j - i));
      long long back = 2 * (go - (x[i + 1] - x[i]));
      long long extra = max(0LL, t - back);
      dp[j] = min(dp[j], dp[i] + go + 2 * (go - (x[i + 1] - x[i])) + extra);
    }
  }
  cout << dp[n] + e - x[n] << '\n';
}
