#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll inf=999999999999999999;
int n,id;
ll a[101010],f[101010],T,E;
int main()
{
	scanf("%d%lld%lld",&n,&E,&T);
	for (int i=1;i<=n;++i) scanf("%lld",&a[i]);
	for (int i=1;i<=n;++i) f[i]=inf;
	ll minn=inf;
	for (int i=1;i<=n;++i)
	{
		while (T<=2*(a[i]-a[id+1]))
			minn=min(minn,f[id]-2*a[id+1]),++id;
		f[i]=min(f[id]+T,2*a[i]+minn);
	}
	printf("%lld\n",E+f[n]);
	return 0;
}
