defmodule Main do def input, do: IO.read(:line) |> String.trim def ii, do: input() |> String.to_integer def li, do: input() |> String.split |> Enum.map(&String.to_integer/1) def yn(b), do: IO.puts(if b, do: "Yes", else: "No") def main do [n, m] = li() map = for i <- 1..n, into: %{}, do: {i, 0} for _ <- 1..m, reduce: map do m -> [_a, b] = li() Map.update!(m, b, fn v -> v+1 end) end |> Enum.count(fn {_, v} -> v == 0 end) |> IO.puts end end