A = int(input()) B = 0 for i in range(1,A): B=B+i print(B)