#include <bits/stdc++.h>
using namespace std;
int n, e, t, a[100100];
long long Dp[100100];
int main() {
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  Dp[0] = 0;
  Dp[1] = (long long)(a[1]) + t;
  for (int i = 2; i <= n; i++) Dp[i] = 10000000000000000ll;
  for (int i = 2; i <= n; i++)
    for (int j = 0; j < i; j++) {
      Dp[i] = min(Dp[i], Dp[j] + (long long)(a[i] - a[j]) +
                             max((a[i] - a[j + 1]) * 2, t));
    }
  long long res = Dp[n] + (long long)(e)-a[n];
  printf("%lld\n", res);
  return 0;
}
