#include <bits/stdc++.h>
using namespace std;
const int MAX = (2e3) + 1;
int n, e, t, x[MAX];
long long dp[MAX];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> e >> t;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    dp[i] = LLONG_MAX;
    for (int j = 0; j < i; j++)
      dp[i] = min(dp[j] + x[i] - x[j] + max(2 * (x[i] - x[j + 1]), t), dp[i]);
  }
  cout << dp[n] + e - x[n];
}
