defmodule Main do def main do IO.gets("") as = IO.gets("") |> String.trim() |> String.split() |> Enum.map(fn s -> String.to_integer(s) end) v = IO.gets("") |> String.trim() |> String.to_integer() IO.puts(Enum.sum(as) - v) end end