#include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int n, m, t;
	cin >> n >> m >> t;
	bool l[10010];
	for (int i = 0; i < t; i++){
		l[i] = true;
	}
	for (int i = 0; i < n; i++){
		int a; cin >> a;
		for (int i = a - m; i <= min(t, a + m - 1); i++) {
			l[i] = false;
		}
	}
	int sum = 0;
	for (int i = 0; i < t; i++){
		if (l[i] == true)sum++;
	}
	cout << sum << endl;
	char c; cin >> c;
}