program bridge
  integer :: n, m, i, k
  integer :: a(50), b(50), c(50)
  a = 0
  b = 0
  c = 0
  read(*,*) n, m
  if (n.eq.1) then
    write(*,'(i0)') 1
    stop
  end if
  do i = 1, m
    read(*,*) a(i), b(i)
  end do
  do i = 1, m
    if (is_bridge(n,m,a(1:m),b(1:m),i)) c(i) = 1
  end do
  write(*,'(i0)') sum(c(1:m))
  stop
contains
  function is_bridge(n,m,a,b,i) result(r)
    implicit none
    integer, intent(in) :: n, m, a(m), b(m), i
    integer             :: x(m-1), y(m-1), j, k
    logical             :: r, v(n)
    k = 0
    do j = 1, m-1
      if (j.eq.i) k = 1
      x(j) = a(j+k)
      y(j) = b(j+k)
    end do
    v = .true.
    call dfs(n,m,x,y,v,x(1))
    r = .false.
    do j = 1, n
      r = r.or.v(j)
    end do
    return
  end function is_bridge
  recursive subroutine dfs(n,m,x,y,v,i)
    implicit none
    integer, intent(in)    :: n, m, x(m-1), y(m-1), i
    logical, intent(inout) :: v(n)
    integer                :: j
    v(i) = .false.
    do j = 1, m-1
      if (x(j).eq.i) then
        if (v(y(j))) call dfs(n,m,x,y,v,y(j))
      end if
      if (y(j).eq.i) then
        if (v(x(j))) call dfs(n,m,x,y,v,x(j))
      end if
    end do
    return
  end subroutine dfs
end program bridge