#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
int n, E, T;
int dis[100010];
long long Dp[100010];
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  n = read();
  E = read();
  T = read();
  for (int i = 1; i <= n; i++) dis[i] = read();
  Dp[0] = 0;
  int pos = 0;
  for (int i = 1; i <= n; i++) {
    Dp[i] = Dp[i - 1] + T;
    long long Min = INF;
    while (pos + 1 <= i && 2 * (dis[i] - dis[pos + 1]) > T) {
      Min = min(Min, Dp[pos] - 2 * dis[pos + 1] + 2 * dis[i]);
      pos++;
    }
    Dp[i] = min(min(Dp[i], Dp[pos] + T), Min);
  }
  cout << Dp[n] + E << endl;
  return 0;
}
