import std.stdio, std.string, std.range, std.algorithm, std.math, std.typecons, std.conv;

void main() {
  auto inp = readln.split.to!(long[]);
  auto N = inp[0], T = inp[1];
  auto t = readln.split.to!(long[]);
  long res = 0;
  foreach (i; 0..N-1) {
    res += min(T, t[i+1] - t[i]);
  }
  res += T;
  writeln(res);
}
