def
solve
(n):
total = 0
for
i in range(n):
total += i
return
total