fun main(args: Array<String>) {
    var (N, T) = pairIntLong()
    val Ts = listOfLong()
    var ans = T
    repeat(N - 1) { n ->
        ans += Math.min(Ts[n + 1] - Ts[n], T)
    }
    println(ans)
}
fun pairIntLong() = listOfLong().let { Pair(it[0].toInt(), it[1]) }

fun next() = readLine()!!
fun listOfString() = next().split(" ")
fun listOfLong() = listOfString().map(String::toLong)
