#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
#define MAX 100100
#define ll long long
inline int read()
{
	int x=0;bool t=false;char ch=getchar();
	while((ch<'0'||ch>'9')&&ch!='-')ch=getchar();
	if(ch=='-')t=true,ch=getchar();
	while(ch<='9'&&ch>='0')x=x*10+ch-48,ch=getchar();
	return t?-x:x;
}
int n,E,T,x[MAX];
ll ans,f[MAX],mn=1e18;
int main()
{
	n=read();E=read();T=read();
	for(int i=1;i<=n;++i)x[i]=read();
	memset(f,63,sizeof(f));f[0]=0;
	for(int i=1,j=0;i<=n;++i)
	{
		for(;T<=(x[i]-x[j+1])<<1;++j)mn=min(mn,f[j]-2*x[j+1]);
		if(j<i)f[i]=min(f[i],f[j]+T);
		f[i]=min(f[i],mn+2*x[i]);
	}
	cout<<f[n]+E<<endl;
	return 0;
}
