#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;
long long f[101010];
long long a[101010];
int main()
{
	int n,e,t,now=1;
	long long mi=21474836478ll;
	scanf("%d%d%d",&n,&e,&t);
	for(int i=1;i<=n;i++)
		scanf("%lld",&a[i]);
	f[0]=0;
	f[1]=t;
	for(int i=2;i<=n;i++)
	{
		while((a[i]-a[now])*2>t)
		{
			mi=min(mi,f[now-1]-2*a[now]);
			now++;
		}
		f[i]=f[now-1]+t;
		f[i]=min(f[i],mi+2*a[i]);
	}
	printf("%lld",(long long)e+f[n]);
	return 0;
}