defmodule Main do
  def main do
    [n,k]=IO.gets("") |> String.trim |> String.split(" ") |> Enum.map(&String.to_integer(&1))
    m=IO.stream(:stdio, :line) 
    |> Enum.take(2*k)
    |> Enum.map(&String.trim(&1))
    |> Enum.drop_every(2)
    |> Enum.map(fn x-> String.split(x, " ") end)
    |> Enum.reduce(Enum.map((1..n), fn x-> Integer.to_string(x) end), fn (x,acc)-> acc--x end)
    |> length()
    |> IO.puts()
    
  end
end
