#include <cstdio>
#include <cstdlib>
#include <algorithm>

typedef long long LL;
const int maxn = 1e5 + 20;

int N, E, T;
int x[maxn];
LL f[maxn];

int main()
{
	scanf("%d%d%d", &N, &E, &T);
	for(int i = 1; i <= N; i++)
	{
		scanf("%d", &x[i]);
	}
	
	LL pmin = 1ll << 60;
	
	for(int i = 1, p = 1; i <= N; i++)
	{
		while(p <= N && (x[i] - x[p]) * 2 > T)
		{
			pmin = std::min(pmin, f[p - 1] - 2 * x[p]);
			p++;
		}
		
		f[i] = f[i - 1] + T;
		f[i] = std::min(f[i], f[p - 1] + T);
		f[i] = std::min(f[i], pmin + 2 * x[i]);
	}
	
	printf("%lld\n", f[N] + E);
	
	return 0;
}