let n,m = stdin.ReadLine().Split() |> Array.map int |> fun x -> x.[0],x.[1]
let ans = [|for i=0 to n-1 do 0|]

let addRoad city1 city2 (list: int array) =
    list.[city1-1] <- 1
    list.[city2-1] <- 1

for i=1 to m do
    let c1,c2 = stdin.ReadLine().Split() |> Array.map int |> fun x -> x.[0],x.[1]
    addRoad c1 c2 ans

ans |> Array.filter (fun x -> x=0) |> Array.length |> printfn "%d"