program r20926c
 
implicit none
integer(16) :: n, m, a, b, i, ans
integer(16), allocatable :: v(:)

read *, n, m
allocate(v(1:n))

v(:) = 0
ans = 0

do i= 1, m
 read *, a, b
 v(a) = v(a) + 1
 v(b) = v(b) + 1
end do

do i= 1, n
 if(v(i)==0) then
  ans = ans + 1
 end if
end do

print *, ans

end program r20926c