import Data.List
import qualified Data.ByteString.Char8 as B
import Debug.Trace 

main :: IO ()
main = breads >>= print . solve 

solve :: [Int] -> Int 
solve [n, k]
    | k == 0 = res - n
    | otherwise = res
    where
        res = foldl' ff 0 [(k + 1)..n]
        ff acc b = acc + m * (b - k) + max 0 (r - k + 1)
            where
                (m, r) = n `divMod` b

breads :: IO [Int]
breads = unfoldr uff <$> B.getLine
    where
        uff b = check <$> B.readInt b
        check (a, b)
            | B.null b = (a, b)
            | otherwise = (a, B.tail b)

