inp = input().split() n = int(inp[0]) k = int(inp[1]) ub = n*(n+1)/2 lb = -n*(n+1)/2+(n-k)*(n-k+1) print(int((ub-lb)/2)+1)