#include <bits/stdc++.h>
using namespace std;
const int len = 1e5 + 5;
const long long inf = 1e15;
int arr[len], n, en, t;
long long dp[len];
long long solve(int i) {
  if (i == n + 1) return 0;
  if (dp[i] != -1) return dp[i];
  long long ans = inf;
  for (int j = i; j <= n; j++) {
    int dis = (arr[j] - arr[i]);
    ans =
        min(ans, 1LL * max(2 * dis, t) + (arr[j + 1] - arr[i]) + solve(j + 1));
  }
  return dp[i] = ans;
}
int main() {
  scanf("%d %d %d", &n, &en, &t);
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  arr[n + 1] = en;
  for (int i = 1; i <= n; i++) dp[i] = -1;
  printf("%lld\n", solve(1) + arr[1]);
  return 0;
}
