main = do
  (n:k:_) <- getLine >>= return . map read . words :: IO [Int]

  print $
    if k>0 then
      sum [(b-k) * (div n b) + (if mod n b >= k then mod n b - (k-1) else 0) | b <- [k+1..n]]
    else
      n*n
