#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2010;
const long long INF = 1LL << 50;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
  return x * f;
}
int n, e, T, d[MAXN];
long long dp[MAXN];
int main() {
  n = read();
  e = read(), T = read();
  for (int i = 1; i <= n; i++) d[i] = read();
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    dp[i] = INF;
    int f = 0;
    for (int j = 0; j < i; j++) {
      long long res = dp[j] + d[i] - d[j] + max(T, 2 * (d[i] - d[j + 1]));
      if (res < dp[i]) {
        dp[i] = res;
        f = j;
      }
    }
  }
  printf("%lld\n", dp[n] + e - d[n]);
  return 0;
}
