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