#include <bits/stdc++.h>
using namespace std;
const long long inf = 1LL << 61;
const long long mod = 1000000007;
const int max_n = 100010;
int n;
long long T, E;
long long dp[max_n], d[max_n];
int main() {
  int i = 0, j = 0, k = 0;
  memset(d, 0, sizeof(d));
  memset(dp, 0, sizeof(dp));
  scanf("%d %I64d %I64d", &n, &E, &T);
  for (i = 1; i <= n; i++) {
    scanf("%I64d", d + i);
  }
  dp[1] = d[1] + T;
  long long ans;
  for (i = 2; i <= n; i++) {
    dp[i] = dp[i - 1] + d[i] - d[i - 1] + T;
    for (j = i - 1; j >= 1; j--) {
      if (d[i] - d[j] > T) break;
      if (T <= 2 * (d[i] - d[j])) {
        ans = dp[j - 1] + d[i] - d[j - 1] + 2 * (d[i] - d[j]);
      } else {
        ans = dp[j - 1] + d[i] - d[j - 1] + T;
      }
      dp[i] = min(dp[i], ans);
    }
  }
  ans = dp[n] + E - d[n];
  printf("%I64d\n", ans);
  return 0;
}
