n, m = map(int, input().split()) ans = 0 for k in range(1, m + 1): d = n // k ans += k * d + k * ((1 + d) * d // 2) print(ans)