#include<bits/stdc++.h>
using namespace std;

typedef long long s64;
#define rep(i,l,r) for(int i=l;i<=r;++i)
const int N=1e5+5;
int x[N];s64 dp[N],mn[N];

int main()
{
	//freopen("1.in","r",stdin);
	int n,e,t;
	cin>>n>>e>>t;
	rep(i,1,n)scanf("%d",x+i);
	mn[n+1]=1e18;
	int j=n;
	for(int i=n;i;--i)
	{
		while(2*(x[j]-x[i])>t)--j;
		dp[i]=min(dp[j+1]+t,mn[j+1]-2*x[i]);
		mn[i]=min(mn[i+1],dp[i+1]+2*x[i]);
	}
	cout<<dp[1]+e;
}