import           Debug.Trace

main :: IO ()
main = do
    [n, k] <- map read . words <$> getLine :: IO [Int]
    print $ solve n k

solve n k = foldr (\b acc -> acc + itr b) 0 bs - if k == 0 then n else 0
    where
      bs = [1..n]
      itr b = let (p, r) = n `divMod` b in
                  p * max 0 (b - k) + max 0 (r - k + 1)
