#include <bits/stdc++.h>
using namespace std;
struct edge {
  int v, w;
};
long long MOD = 1000000007;
long long _MOD = 1000000009;
double EPS = 1e-10;
int main() {
  int N, E, T;
  cin >> N >> E >> T;
  vector<int> x(N);
  for (int i = 0; i < N; i++) scanf("%d", &x[i]);
  vector<long long> dp(N + 1, LLONG_MAX);
  dp[0] = 0;
  for (int i = 0; i <= N; i++)
    for (int j = i + 1; j <= N; j++)
      dp[j] = min(dp[j], dp[i] + max(T - (x[j - 1] - x[i]), x[j - 1] - x[i]) +
                             x[j - 1] - x[i]);
  cout << dp[N] + E << endl;
}
