program sentou
  implicit none
  integer :: n, t, s(20000) = 0, i, x = 0
  read(*,*) n, t
  read(*,*) s(1:n)
  x = t
  do i = 1, n-1
    x = x+min(s(i+1)-s(i),t)
  end do
  write(*,'(i0)') x
end program sentou