#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int INF = 1000 * 1000 * 1000 + 7;
const long long LINF = INF * (long long)INF;
long long dp[100001];
int N, E, T;
int a[100001];
long long dpRMQ[100001];
int opt = 0;
long long cost(int i, int opt) {
  long long prev = 0;
  prev = dp[opt - 1];
  long long cur = max((a[i] - a[opt]) * 2, T);
  return prev + cur;
}
int findOpt(int idx) { return lower_bound(a, a + N, a[idx] - T / 2) - a; }
long long findDp(int idx) {
  int opt = findOpt(idx);
  long long dp1 = dp[opt - 1] + T;
  long long dp2 = a[idx] * 2;
  if (opt - 1 >= 0) dp2 += dp[opt - 1];
  return (min(dp1, dp2));
}
int main() {
  scanf("%d %d %d", &N, &E, &T);
  for (int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  dp[0] = T;
  dpRMQ[0] = T;
  for (int i = 1; i < N; i++) {
    dp[i] = findDp(i);
  }
  cout << dp[N - 1] + E;
}
