#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long a = 0, b = getchar(), c = 1;
  while (!isdigit(b)) c = b == '-' ? -1 : 1, b = getchar();
  while (isdigit(b)) a = a * 10 + b - '0', b = getchar();
  return a * c;
}
long long n, t, e, a[200005], dp[200005];
int main() {
  n = read(), e = read(), t = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  memset(dp, 0x3f, sizeof(dp)), dp[0] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < i; j++)
      dp[i] = min(dp[i], max(dp[j] + a[i] - a[j] + a[i] - a[j + 1],
                             dp[j] + a[j + 1] - a[j] + t) +
                             a[i] - a[j + 1]);
  printf("%lld", dp[n] - a[n] + e);
  return 0;
}
