#include <bits/stdc++.h>
using namespace std;
int n, t, w;
long long dp[2500];
int x[2500];
int main() {
  cin >> n >> w >> t;
  dp[0] = 0, x[0] = 0;
  for (int i = 0; i < n; i++) {
    cin >> x[i + 1];
    dp[i + 1] = 1145141919810;
  }
  for (int len = 1; len < n; len++) {
    for (int org = 0; org <= n - len; org++) {
      dp[len + org] =
          dp[org] + min(2 * (x[org + len] - x[org]), t) + x[org + len];
    }
  }
  cout << dp[n] + w - x[n] << endl;
  return 0;
}
