N, K = map(int, input().split()) sum = lambda x: x * (x + 1) // 2 ans = sum(N) - sum(N-K) + 1 print(ans)