#include<iostream>
#include<list>
#include<vector>
#include<algorithm>
#include<string>
#include<stdio.h>
#include<math.h>
#include<unordered_map>

using namespace std;
using vec = vector<int>;
using mat = vector<vec>;
using lst = list<int>;


bool solve()
{
	int N, M, T;
	cin >> N >> M >> T;

	vec V(T+1, 0);

	for (int i = 0; i < N; ++i)
	{
		int a; cin >> a;

		V[a - M + 1] = 1;
		if (a + M + 1 <= T)
			V[a + M + 1] = -1;
	}

	int ans = 0;

	for (int i = 1; i <= T; ++i)
	{
		V[i] += V[i - 1];
		ans += V[i] == 0;
	}

	cout << ans << endl;

	return true;
}


int main()
{
	solve();

	return 0;
}
