#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const double EPS = 1e-8;
const long long inf = 1e15;
int main() {
  long long n, e, t;
  cin >> n >> e >> t;
  vector<long long> in(n + 1);
  for (int i = 0; i < n; i++) cin >> in[i + 1];
  vector<long long> dp(n + 1, inf);
  dp[0] = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < i + 1; j++) {
      long long sum = dp[j] + in[j + 1] - in[j];
      sum += max<long long>(t, 2 * (in[i + 1] - in[j + 1])) + in[i + 1] -
             in[j + 1];
      dp[i + 1] = min<long long>(dp[i + 1], sum);
    }
  cout << dp[n] + e - in[n] << endl;
}
