open System let sum n = let rec loop(n, ans) = if n < 0 then ans else loop((n-1), n+ans) in loop(n, 0) let n = int(Console.ReadLine()) printfn "%d" (sum n)