object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val t = sc.nextLong()
  val a = List.fill(n)(sc.nextLong())
  if (n == 1) {
    println(t)
  } else {
    val ans = a.sliding(2).map{case List(a1, a2) => t.min(a2 - a1)}.sum + t
    println(ans)
  }
}
