#import <stdio.h>
#import <stdlib.h>

int main(int argc, const char * argv[]) {
    long N, T;
    scanf("%ld %ld", &N, &T);
    long *t = (long*)malloc(N * sizeof(long));
    
    long n;
    long i = 0;
    while (scanf("%ld", &n) != EOF) {
        t[i] = n;
        i++;
    }
    
    long last = 0;
    long total = 0;
    for(i=0;i<N;i++){
        total += T - ((t[i]<last) ? (last-t[i]) : 0);
        last = t[i]+T;
    }
    
    printf("%ld", total);
    
    free(t);
    return 0;
}
