solve :: Int -> Int -> Int
solve n 0 = n*n
solve n k = sum [ (div n b) * max 0 (b-k) + max 0 (mod n b - k+1)| b <- [1..n]]

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