#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
const long long inf = 1000000000000000000ll;
int n;
long long e, T;
long long dp[N][N], x[N];
int main() {
  int i, j;
  scanf("%d%lld%lld", &n, &e, &T);
  for (i = 1; i <= n; i++) scanf("%lld", &x[i]);
  x[n + 1] = e;
  for (i = 0; i <= n + 1; i++)
    for (j = 0; j <= n + 1; j++) dp[i][j] = inf;
  dp[1][1] = x[1];
  for (i = 1; i <= n; i++)
    for (j = 1; j <= i; j++)
      if (dp[i][j] < inf) {
        dp[i + 1][i + 1] =
            min(dp[i + 1][i + 1],
                dp[i][j] + max(2 * (x[i] - x[j]), T) + x[i + 1] - x[i]);
        dp[i + 1][j] = min(dp[i + 1][j], dp[i][j] + x[i + 1] - x[i]);
      }
  printf("%lld\n", dp[n + 1][n + 1]);
  return 0;
}
