#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
long long dp[MAXN][MAXN];
int n, a[MAXN], e, t;
int main() {
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(dp, 127 / 3, sizeof dp);
  dp[0][0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < i; j++) dp[i][j] = dp[i - 1][j] + a[i] - a[i - 1];
    for (int j = 0; j < i; j++)
      dp[i][i] = min(dp[i][i], dp[i - 1][j] + a[i] - a[i - 1] +
                                   max(t, 2 * (a[i] - a[j + 1])));
  }
  cout << dp[n][n] + e - a[n] << endl;
  return 0;
}
