#define ENABLE_DEBUG 1
// Kana's kitchen {{{
#include<bits/stdc++.h>
#define ALL(v) std::begin(v), std::end(v)
#define REP(i, k) for (decltype(k) i = 0; i < k; i++)
#define LOOP(k) REP (ngtkana_is_a_genius, k)

using i32 = std::int_least32_t;
using i64 = std::int_least64_t;
using u32 = std::uint_least32_t;
using u64 = std::uint_least64_t;
using usize = std::size_t;

template <class T, class U> using pair = std::pair<U, T>;
template <class T> using diag_pair = std::pair<T, T>;
template <class... Args> using tuple = std::tuple<Args...>;
template <class T> using vec = std::vector<T>;
template <class T> using numr = std::numeric_limits<T>;

#ifdef NGTKANA
#include<debug.hpp>
#else
#define DEBUG(...)(void)0
#endif
/*}}}*/
auto cmn = [](auto& x, auto y){ if (x>y) { x=y; return true; } return false; };
int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    std::cout << std::setprecision(15) << std::fixed;

    u64 n, E, T; std::cin >> n >> E >> T;
    assert(n<=u64{2000});
    vec<u64> a(n + 1);
    for (usize i=1; i<=n; i++) std::cin >> a.at(i);
    n++;

    u64 inf = numr<u64>::max();
    vec<u64> dp(n, inf);
    dp.at(0) = 0;
    for (u64 i=0; i<n; i++) {
        for (u64 j=i+1; j<n; j++) {
            cmn(dp.at(j),
                dp.at(i)
                + a.at(j) - a.at(i)
                + std::max(T, 2 * (a.at(j) - a.at(i+1))));
        }
    }

    u64 ans = dp.at(n-1) + E - a.at(n-1);
    std::cout << ans << '\n';
}
