s=input() print(sum([int(i)for i in range(s)]))