#include <iostream>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <utility>
#include <map>
#include <set>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <sstream>
#include <cstring>
#include <bitset>
#include <stack>
using namespace std;
#define MP make_pair
#define PB push_back
const int INF=1e9;

int n,e,t,pos;
long long a[100005];
long long dp[100005],cur;

int main()
{
	cin>>n>>e>>t;
	for (int i=1;i<=n;i++) cin>>a[i];
	dp[0]=0;
	cur=1e18;
	pos=0;
	for (int i=1;i<=n;i++)
	{
		while (t<=2*(a[i]-a[pos+1]))
		{
			cur=min(cur,dp[pos]-2*a[pos+1]);
			pos++;
		}
		dp[i]=min(cur+2*a[i],dp[pos]+t);
	}
	cout<<dp[n]+e;
	return 0;
}