#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100, mod = 1e9 + 7, maxa = 1e6 + 100, maxb = 23;
const long long inf = 2e18 + 13;
int max(int x, int y){return (x > y ? x : y);}
int min(int x, int y){return (x < y ? x : y);}

long long dp[maxn];
long long pm[maxn];
long long x[maxn];

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    long long n, e, t;
    cin >> n >> e >> t;
    fill(dp, dp + maxn, inf);
    t *= 2;
    e *= 2;
    int p1 = 0;
    for(int i = 1; i <= n; i++){cin >> x[i]; x[i] *= 2;}
    dp[0] = 0;

    for(int i = 1; i <= n; i++)
    {
        while(p1 + 1 < i && x[p1 + 1] <= x[i] - t / 2){p1++;}
        if(!p1){dp[i] = t;}
        else{dp[i] = min(dp[p1] + t, pm[p1] + x[i] * 2);}
        pm[i] = min(pm[i - 1], dp[i - 1] - 2 * x[i]);
       // cout << p1<<" "<< i << ' ' << dp[i] << ' ' << pm[i] << endl;
    }

    cout << (dp[n] + e) / 2 << endl;
    return 0;
}
