#include <bits/stdc++.h>
using namespace std;
const double PI = acos(0) * 2;
const double EPS = 1e-8;
const long long MOD = 1e9 + 7;
const int MAXN = 1e5 + 5;
const long long oo = 1e18;
const double foo = 1e30;
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return __builtin_popcounll(s);
}
template <class T>
T sqr(T x) {
  return x * x;
}
inline void addmod(int& a, int val, int p = MOD) {
  if ((a = (a + val)) >= p) a -= p;
}
inline void submod(int& a, int val, int p = MOD) {
  if ((a = (a - val)) < 0) a += p;
}
inline int mult(int a, int b, int p = MOD) { return (long long)a * b % p; }
int N, E;
long long a[MAXN], dp[MAXN], T;
int main() {
  scanf("%d%d%d", &N, &E, &T);
  for (int i = 0; i < N; i++) scanf("%d", &a[i]);
  for (int i = 0; i < N; i++) dp[i] = oo;
  dp[0] = T + a[0];
  for (int i = 0; i < N; i++) {
    for (int j = 0; j <= i; j++) {
      long long dis = (a[i] - a[j]) * 2;
      long long wait = max(0ll, T - dis);
      long long cur = dis / 2 * 3 + wait + a[j] - (j != 0 ? a[j - 1] : 0);
      if (j) cur += dp[j - 1];
      dp[i] = min(cur, dp[i]);
    }
  }
  cout << (E - a[N - 1]) + dp[N - 1];
}
