N,L = list(map(int,input().split())) d = 1 count = 0 while (N-1)*d <= L: count += L - (N-1) * d + 1 d += 1 print(count)