#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define P pair<LL,LL>
const LL inf = 0x3f3f3f3f;
const LL mod = 924844033;
const LL N = 1e5+10;
template <typename tp> inline void read(tp &x)
{
	x=0;char c=getchar();int f=0;
	for(;c>'9'||c<'0';f|=(c=='-'),c=getchar());
	for(;c<='9'&&c>='0';x=(x<<3)+(x<<1)+c-'0',c=getchar());
	if(f) x=-x;
}
LL n,e,t;
LL x[N],dp[N];
signed main()
{
	read(n),read(e),read(t);
	for(int i=1;i<=n;i++) read(x[i]);
	memset(dp,inf,sizeof(dp));
	LL flag=inf;dp[0]=0;
	for(int i=1,now=0;i<=n;i++)
	{
		while(t<=2*(x[i]-x[now+1]))
			flag=min(flag,dp[now]-2*x[now+1]),now++;
		dp[i]=min(dp[now]+t,flag+2*x[i]);
	}
	printf("%lld\n",dp[n]+e);
	return 0;
}