import java.util.Scanner

fun main(args: Array<String>){
  val cin = Scanner(System.`in`)
  val n = cin.nextLong()
  val t = cin.nextLong()

  var res = 0L
  var tmp = 0L
  for (i in 0..n - 1){
    val a = cin.nextLong()
    if (t < a - tmp){
      res += t
    }
    else {
      res += (a - tmp)
    }
    tmp = a
  }

  println(res + t)
  cin.close()
}