v#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <iomanip>
#include <functional>
#include <cassert>

using namespace std;

typedef long long ll;

const ll Inf = 1e18;

int main() {
  ios_base::sync_with_stdio(false); cin.tie(0);
#ifdef LOCAL
  freopen("input.txt", "r", stdin);
#endif
  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 <ll> dp(n + 1, Inf);
  dp[0] = 0;
  for (int i = 0; i < n; ++i) {
    ll go = 0;
    for (int j = i + 1; j <= n; ++j) {
      go += x[j] - x[j - 1];
      dp[j] = min(dp[j], dp[i] + go + (ll)t * (j - i));
      ll back = 2 * (go - (x[i + 1] - x[i]));
      ll 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';
}
