#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<queue>
using namespace std;

typedef long long LL;

inline int read()
{
	char c=getchar();int num=0,f=1;
	for(;!isdigit(c);c=getchar())
		f=c=='-'?-1:f;
	for(;isdigit(c);c=getchar())
		num=num*10+c-'0';
	return num*f;
}

const int N=1e5+5;

int n,E,T,x[N];
LL f[N];

int main()
{
	n=read(),E=read(),T=read();
	for(int i=1;i<=n;++i) x[i]=read();
	LL mn=1ll<<60;
	for(int i=1,j=0;i<=n;++i)
	{
		while(T<=2*(x[i]-x[j+1])) mn=min(mn,f[j]-2*x[j+1]),++j;
		if(i!=j) f[i]=min(mn+2*x[i],f[j]+T);
		else f[i]=mn+2*x[i];
	}
	cout<<f[n]+E;
	return 0;
}