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