#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 100005;
long long a[N];
long long dp[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  long long t, e;
  cin >> n >> e >> t;
  for (int i = 1; i <= (n); ++i) {
    cin >> a[i];
  }
  const long long inf = mod * 1LL * mod;
  for (int i = 1; i <= (n); ++i) {
    dp[i] = inf;
    for (int j = 0; j <= (i - 1); ++j) {
      dp[i] = min(dp[i], dp[j] + a[j + 1] - a[j] + a[i] - a[j + 1] +
                             max(t, 2 * (a[i] - a[j + 1])));
    }
  }
  cout << dp[n] + e - a[n] << endl;
  return 0;
}
