#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <algorithm>
using namespace std;
inline int read()
{
	int res, ok = 1;
	char ch;
	for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar())
	if (ch == '-')
	ok = -1;
	res = ch - '0';
	for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
	res = res * 10 + ch - '0';
	return res * ok;
}
int n, t, e, a[100005], last;
long long ans[100005], minn = 1LL << 60;
int main()
{
	n = read();
	e = read();
	t = read();
	for (int i = 1; i <= n; i++)
	a[i] = read();
	ans[0] = 0;
	ans[1] = t;
	for (int i = 2; i <= n; i++)
	{
		while (2LL * (a[i] - a[last + 1]) > t)
		{
			long long now = ans[last] - 2LL * a[last + 1];
			minn = min (minn, now);
			last++;
		}
		ans[i] = ans[i - 1] + t;
		if (last > 0)
		ans[i] = min (ans[i], minn + 2LL * a[i]);
		ans[i] = min (ans[i], ans[last] + t);
	}
	printf ("%lld\n", ans[n] + e);
	return 0;
}