function pint(s) { return parseInt(s); }
function pfloat(s) { return parseFloat(s); }
Array.prototype.sortNumAsc  = function () { return this.sort((a, b) => (a - b)); }
Array.prototype.sortNumDesc = function () { return this.sort((a, b) => (b - a)); }
Array.prototype.sortStrAsc  = function () { return this.sort();                  }
Array.prototype.sortStrDesc = function () { return this.sort().reverse();        }
Array.prototype.without = function (itm) { return this.filter((elem) => elem !== itm); }
var input = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', chunk => input += chunk);
process.stdin.on('end', () => {
  var lines = input.split('\n').map(l => l.trim());
  if (lines[lines.length-1] === '')
    lines = lines.slice(0, -1);
  main(lines);
});
function main(lines) {
  var arr = lines[0].split(' ').map(pint);
  var N = arr[0];
  var T = arr[1];
  arr = lines[1].split(' ').map(pint);
  if (N === 1) {
    console.log(T);
    return;
  }
  var t = 0;
  for (var i = 0; i < N - 1; i++) {
    var curr = arr[i];
    var next = arr[i+1];
    var s = (next - curr);
    t += Math.min(T, s);
  }
  t += T;
  console.log(t);
}