#include<bits/stdc++.h>
#define INTMAX 2147483647LL
#define PII pair<int,int>
#define MK make_pair
#define re register
using namespace std;
typedef long long ll;
const double Pi=acos(-1.0);
const int Inf=0x3f3f3f3f;
const int MAXN=1e5+10;
inline int read(){
	re int x=0,f=1,ch=getchar();
	while(!isdigit(ch))f=ch=='-'?-1:1,ch=getchar();
	while(isdigit(ch))x=x*10+ch-48,ch=getchar();
	return x*f;
}
inline ll readll(){
	re ll x=0,f=1,ch=getchar();
	while(!isdigit(ch))f=ch=='-'?-1:1,ch=getchar();
	while(isdigit(ch))x=x*10+ch-48,ch=getchar();
	return x*f;
}

int n; 
ll E,T;
ll a[MAXN],f[MAXN];
int main(){
	n=read();E=readll();T=readll();
	for(int i=1;i<=n;++i) a[i]=readll();
	
	f[0]=0;
	int now=0;ll mn=1e18+7;
	for(int i=1;i<=n;++i){
		while(T<=2*(a[i]-a[now+1])){
			mn=min(mn,f[now]-2*a[now+1]);++now;
		}
		f[i]=min(f[now]+T,mn+2*a[i]);
	}
	printf("%lld",E+f[n]);
	return 0;
}