#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 100005;
const ll INF = ll(1e18);
int n, l, t, x[N];
ll d[N];
int main() {
  scanf("%d%d%d", &n, &l, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%d", x + i);
    d[i] = INF;
    for (int j = 0; j < i; j++) {
      d[i] = min(d[i], d[j] + max(2 * (x[i] - x[j + 1]), t) + x[i] - x[j]);
    }
  }
  printf("%lld\n", d[n] + l - x[n]);
}
