#include <iostream>

#define REP(i,n) for(int i=0; i<n; i++)
#define debug(x) cerr << #x << " = " << (x) << endl;

using namespace std;

int main(){
	int n, m, t, a1, a2, a[101], used=0;
	cin >> n >> m >> t;
	used += m;
	
	REP(i,n) cin >> a[i];
	
	for (int i=0; i<n-1; i++){
		used += min(a[i+1]-a[i], 2*m);
	}
	used += min(m, t-a[n-1]);
	cout << t-used << endl;
	return 0;
}

