#include<cstdio>
#include<iostream>
#include<cstring>
#define RG register
#define LL long long
using namespace std;
const int N=1e5+10;
int n;
LL e,t,x[N],dp[N],tt=1e18;
template<typename I> inline void read(I &ot){
	I ch=getchar(), x=0, f=1;
	while(ch<'0' || ch>'9'){if(ch=='-') f=-1; ch=getchar();	}
	while(ch>='0' && ch<='9'){x=x*10+ch-'0'; ch=getchar();	}
	ot=x*f;}
template<typename I, typename... U> inline void read(I &x,U&... y){read(x); read(y...);}
template<typename I>inline I mi(const I&a,const I&b){return a<b ? a : b;}
int main()
{
//	freopen("Shik and Game.in","r",stdin);
	read(n,e,t);
	for(RG int i=1;i<=n;i++) read(x[i]), dp[i]=2e9;
	for(RG int i=1,j=0;i<=n;i++)
	{
		while(2*(x[i]-x[j+1])>=t) 
		{
			tt=mi(tt,dp[j]-2*x[j+1]);
			j++;
		}
		dp[i]=mi(dp[j]+t,tt+2*x[i]);
	}
	printf("%lld\n",dp[n]+e);
	return 0;
}