#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll,ll> pii;

const ll maxn=100003;

ll pos,n,T,E,x[maxn],mn=0x3f3f3f3f3f3f3f3f,f[maxn];

int main(){
	scanf("%lld%lld%lld",&n,&E,&T);
	for(ll i=1;i<=n;++i){
		scanf("%d",&x[i]);
		while(pos<i&&2*(x[i]-x[pos+1])>T){
			mn=min(mn,f[pos]-2*x[pos+1]);
			++pos;
		}
//		printf("%lld %lld !\n",pos,f[pos]+T);
		f[i]=min(mn+2*x[i],f[pos]+T);
	}
	printf("%lld\n",f[n]+E);
	return 0;
}

