#include <bits/stdc++.h>
using namespace std;
int n, e, t, x[666666];
long long dp[666666];
int main() {
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%d", x + i);
  memset(dp, 127 / 3, sizeof(dp));
  dp[0] = x[1];
  x[0] = x[1];
  for (int i = 1; i <= n; i++) {
    for (int pos = 0; pos < i; pos++) {
      int l2 = x[i] - x[pos];
      if (2 * l2 >= t) dp[i] = min(dp[i], dp[pos] + l2 * 3LL);
      dp[i] = min(dp[i], dp[pos] + (i - pos) * long long(t) + l2);
    }
  }
  long long ans = dp[n] + e - x[n];
  cout << ans << "\n";
}
