import std.stdio, std.string, std.array, std.conv, std.algorithm, std.typecons, std.range, std.container, std.math, std.algorithm.searching, std.functional,std.mathspecial, std.numeric;

void main(){
    auto nt=readln.split.map!(to!long).array;
    auto ts=readln.split.map!(to!long).array;
    auto T=nt[1];
    long last=0;
    long sum=0;
    foreach(t;ts){
        sum+=min(T,t-last);
        last=t;
    }
    sum+=T;
    writeln(sum);
}
