#include<iostream>
using namespace std;
int main(){
    int n,m,t;
    cin >> n >> m >> t;
    int a[150];
    for(int i = 0;i < n;i++)cin >> a[i];
    
    int loss = m;//begin and end
    for(int i = 0;i < n-1;i++){
        loss += min(2 * m, a[i+1] - a[i]);
    }

    loss += min(m, t - a[n-1]);

    cout << t - loss << endl;
}