N, K = map(int, input().split()) SUM = (2*N - K + 1)*K // 2 from sys import stderr stderr.write("SUM: {}\n".format(SUM)) print(SUM + 1)