#include <bits/stdc++.h>
using namespace std;
long long dp[2005];
int num[2005];
int n, e, t;
long long work(int i, int j) {
  long long res = 0, xx = 0;
  for (int k = 0; k <= j; k++) {
    if ((num[j] - num[i]) * 2 + xx < t) {
      res += t - (num[j] - num[i]) * 2 - xx;
      xx += t - (num[j] - num[i]) * 2 - xx;
    }
  }
  return res + 3LL * (num[j] - num[i]);
}
int main() {
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &num[i]);
  }
  num[0] = 0;
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    long long tmp = dp[i - 1] + num[i] - num[i - 1] + t;
    for (int j = 0; j < i - 1; j++) {
      tmp = min(tmp, dp[j] + num[j + 1] - num[j] + work(j + 1, i));
    }
    dp[i] = tmp;
  }
  cout << dp[n] + e - num[n] << endl;
}
