#include <bits/stdc++.h>
using namespace std;
long long dp[100005], n, e, t, pos[1000005];
int main() {
  scanf("%lld %lld %lld", &n, &e, &t);
  for (int i = 1; i <= n; i++) scanf("%lld", &pos[i]);
  dp[0] = 0;
  dp[1] = (long long)1e18;
  for (int i = 1; i <= n; i++) {
    dp[i] = min(dp[i - 1] + pos[i] - pos[i - 1] + t, dp[i]);
    dp[i + 1] = dp[i - 1] + pos[i] - pos[i - 1] + pos[i + 1] - pos[i + 1 - 1] +
                max(t, (pos[i + 1] - pos[i + 1 - 1]) * 2);
  }
  printf("%lld", dp[n] + e - pos[n]);
}
