#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
const long long BINF = 1e18 + 10;
long long dp[N], a[N];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, e, t;
  cin >> n >> e >> t;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  dp[1] = a[1] + t;
  for (long long i = 2; i <= n; i++) {
    dp[i] = BINF;
    for (long long j = 1; j <= i; j++) {
      dp[i] = min(dp[i], dp[j - 1] + (a[j] - a[j - 1]) + (a[i] - a[j]) +
                             max(2 * (a[i] - a[j]), t));
    }
  }
  cout << dp[n] + (e - a[n]) << '\n';
}
