#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#define lol(i,n) for(ll i=0;i<n;i++)
#define mod 1000000007
#define chmin(a,b) a=min(a,b);
typedef long long ll;

using namespace std;
#define N 200010
ll n,d[N],t,e;
ll BN(ll key){
    ll l=-1,r=n,m=(l+r)/2;
    for(;l<r-1;m=(l+r)/2){
	if(d[m+1]*2<key)l=m;
	else r=m;
    }
    return l;
}
ll f[N],g[N];
int main(){
    cin>>n>>e>>t; d[0]=0;
    lol(i,n)cin>>d[i+1];
    lol(i,N)f[i]=1e18; f[0]=0,g[0]=-2*d[1];
    for(ll i=1;i<=n;i++){
	ll surf=BN(d[i]*2-t);
	ll res=1e17;
	if(surf+1<i)chmin(res,f[surf+1]+t);
	if(~surf)chmin(res,g[surf]+2*d[i]);
	f[i]=res;
	g[i]=min(g[i-1],f[i]-2*d[i+1]);
    }
    cout<<f[n]+e<<endl;
    return 0;
}
