#include <bits/stdc++.h>
using namespace std;
long long dp[2010];
int x[2010];
int n, e;
long long t;
long long mn = 4e18;
int main() {
  scanf("%d%d%lld", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%d", x + i);
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < i; j++)
      mn = min(mn, (t - x[i] + x[j] + 1) / (x[i] - x[j]) * (x[i] - x[j]));
    dp[i] = 4e18;
    for (int j = 0; j + 1 < i; j++) {
      long long tt = 2 * (x[i] - x[j + 1]);
      dp[i] = min(dp[i], dp[j] + x[i] - x[j] + min(mn + tt, t * (i - j)));
    }
    dp[i] = min(dp[i], dp[i - 1] + x[i] - x[i - 1] + t);
  }
  printf("%lld", dp[n] + e - x[n]);
  return 0;
}
