#include <bits/stdc++.h>
#define all(vec) vec.begin(),vec.end()
#define mp make_pair
using namespace std;
using ll=long long;
using P=pair<ll,ll>;
const ll INF=1LL<<30;
const ll LINF=1LL<<62;
const double eps=1e-9;
const ll MOD=1000000007LL;
template<typename T>void chmin(T &a,T b){a=min(a,b);};
template<typename T>void chmax(T &a,T b){a=max(a,b);};
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
	ll n,e,t;cin>>n>>e>>t;
	vector<ll> x(n+10);
	for(int i=1;i<=n;i++){
		cin>>x[i];
	}
	vector<ll> dp(n+10,LINF);
	dp[0]=0;
	int id=0;
	ll mix=LINF;
	for(int i=1;i<=n;i++){
		if(i>1)mix+=2LL*(x[i]-x[i-1]);
		while(id<i&&2LL*(x[i]-x[id+1])>t){
			chmin(mix,dp[id]+2LL*(x[i]-x[id+1]));
			id++;
		}
		chmin(dp[i],mix);
		chmin(dp[i],dp[id]+t);
	}
	cout<<e+dp[n]<<endl;
}
