#include<bits/stdc++.h>
using namespace std;
const int N=100005;
long long x[N],d[N],z=INT_MAX,e,t;
int main()
{
	int n;
	scanf("%d%lld%lld",&n,&e,&t);
	for(int i=1;i<=n;i++) scanf("%lld",&x[i]);
	for(int i=1,j=0;i<=n;i++)
	{
		while((x[i]-x[j+1])*2>t){z=min(z,d[j]-x[j+1]*2);j++;} 
		d[i]=min(z+x[i]*2,d[j]+t);
	}
	printf("%lld\n",d[n]+e);
	return 0;
}