void main()
{
    long[] tmp = readln.split.to!(long[]);
    long n = tmp[0], t = tmp[1];
    long[] a = readln.split.to!(long[]);

    long x = t;
    foreach (i; 0 .. n-1)
    {
        x += min(t, a[i+1]-a[i]);
    }

    x.writeln;
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;