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