N = int(input()) loop = 0 output = 0 while loop < N: output += loop loop += 1 print(output)