#input s = input() n = int(s) sum = 0 for i in range(0,n):sum +=i print (sum)