#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
long long dp[N];
int x[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, T;
  cin >> n >> m >> T;
  for (int i = 1; i <= n; i++) {
    dp[i] = 1e18;
    cin >> x[i];
    for (int l = 1; l <= n; l++)
      dp[i] = min(dp[i], dp[l - 1] + max(2 * x[i] - 2 * x[l], T));
  }
  cout << dp[n] + m << endl;
}
