defmodule Main do
  def main do
    IO.gets("")
    |> String.trim()
    |> String.to_integer()
    |> process(0)
    |> IO.inspect()
  end
  
  def process(0, acc), do: acc
  def process(n, acc), do: process(n-1, acc+n)
end