#include <bits/stdc++.h>
using namespace std;
long long int x[2002];
long long int dp[2002];
int main(void) {
  int n, e, t;
  scanf("%d%d%d", &n, &e, &t);
  int i, j;
  for (i = 1; i <= n; i++) scanf("%lld", &x[i]);
  sort(x + 1, x + n + 1);
  dp[0] = 0;
  for (i = 1; i <= n; i++) {
    long long int tmp = 1000000000000000LL;
    for (j = 0; j < i; j++)
      tmp = min(tmp, dp[j] + max(2 * (x[i] - x[j + 1]), (long long int)t));
    dp[i] = tmp;
  }
  printf("%lld\n", e + dp[n]);
  return 0;
}
