def Gauss(n): return n * (n + 1)//2 N, K = map(int, input().split()) print(Gauss(N) - Gauss(N - K) + 1)