module Main where

import Control.Applicative
import Control.Monad
import Data.List
import Data.Maybe
import qualified Data.IntMap.Strict as M

conn :: M.IntMap [Int] -> Bool
conn m = iter (M.singleton k ()) [k]
  where
    k = fst $ M.findMin m
    iter s []     = M.null $ M.difference m s
    iter s (t:ts)
        | isNothing as = iter s ts
        | otherwise    = iter (foldr (\k acc -> M.insert k () acc) s bs) (bs ++ ts)
      where
        as = M.lookup t m
        bs = filter (`M.notMember` s) (fromJust as)

isBridge :: M.IntMap [Int] -> (M.Key, Int) -> Bool
isBridge m (k, e) = not . conn . M.adjust (delete k) e . M.adjust (delete e) k $ m

main :: IO ()
main = do
    [n, m] <- fmap read . words <$> getLine :: IO [Int]
    es <- replicateM m $ do
        [a, b] <- fmap read . words <$> getLine :: IO [Int]
        return (a, b)
    let edges = concatMap (\(a, b) -> [(a, [b]), (b, [a])]) es
    let grp = M.fromListWith (++) edges
    print $ length $ filter (isBridge grp) es