N,K = map(int,input().split()) maxn = N*(N+1)//2 c = N-K minn = -(maxn-c*(c+1)) d = maxn-minn print(d//2+1)