main = do
    [n,k] <- map read . words <$> getLine :: IO [Int]
    let ans | k == 0 = n ^ 2
            | otherwise = sum $ map (\b -> let (p,r) = n `divMod` b in p * (max 0 (b-k)) + max 0 (r-k+1)) [1..n]
    print ans