#include <bits/stdc++.h>
using namespace std;
long long dp[100010], a[100010], T, tmp = 1000000000000000LL;
int n, m, t;
int main() {
  freopen("computer.in", "r", stdin);
  freopen("computer.out", "w", stdout);
  scanf("%d%d%lld", &n, &m, &T);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (int i = 1; i <= n; i++) {
    while (T <= 2 * (a[i] - a[t + 1]))
      tmp = min(tmp, dp[t] - 2 * a[t + 1]), t++;
    dp[i] = min(tmp + 2 * a[i], dp[t] + T);
  }
  printf("%lld\n", dp[n] + m);
}
