defmodule Main do
  def main do
    IO.stream(:stdio, :line)
    |> Enum.map(&String.trim/1)
    |> Enum.map(&String.to_integer/1)
    |> process()
    |> IO.inspect()
  end
  
  defp process([a, b, h]), do: div((a + b) * h, 2)
end