a = int(input()) print(np.sum([i for i in range(int(input()))]))