/* --- author: dxm --- */
#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define INF 2147483647
#define Inf 1e18
#define rep(i,n) for(int (i)=0;(i)<n;i++)
#define REP(i,n) for(int (i)=1;(i)<=n;i++)
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
inline void Fail(){
	printf("0");
	exit(0);
}

const int maxn=100005;
int n,e,t,l=-1;
ll cur=Inf;
ll dp[maxn];
int x[maxn];

int main(){
	scanf("%d%d%d",&n,&e,&t);
	rep(i,n)scanf("%d",&x[i]);
	rep(i,n){
		while(2LL*(x[i]-x[l+1])>=t){
			cur=min(cur,(l<0?0:dp[l])-2LL*x[l+1]);
			l++;
		}
		dp[i]=min(cur+2LL*x[i],(l<0?0:dp[l])+t);
	}
	printf("%lld",e+dp[n-1]);
	return 0;
}

/*
Input:
-----------------
Output:
*/