defmodule Main do def main do n = IO.gets("") |> String.trim |> String.to_integer for x <- 0..n do x end |> Enum.reduce(&(&1+ &2)) end end