N,K=map(int,input().split()) ma=N*(N+1)//2-(N-K)*(N-K+1)//2 mi=0 ans=ma-mi+1 print(ans)