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

typedef long long ll;
const int N=100100;
const ll inf=1e18;
ll a[N],f[N],mn,T,L;
int n,q[N];
int main(){
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cin>>n>>L>>T;
	for(int i=1;i<=n;++i)cin>>a[i],f[i]=i*T;
	mn=inf;
	int t=0,w=0;q[0]=0;
	for(int i=1,j=0;i<=n;++i){
		for(;j<i&&2*(a[i]-a[j+1])>T;++j)mn=min(mn,f[j]-2*a[j+1]);
		f[i]=min(f[i],mn+2*a[i]);
		for(;t<=w&&2*(a[i]-a[q[t]+1])>T;++t);
		if(t<=w)f[i]=min(f[i],f[q[t]]+T);
		for(;t<=w&&f[q[w]]>f[i];--w);
		q[++w]=i;
	}
	cout<<L+f[n]<<'\n';
	return 0;
}
