import Data.List.Split

toInt :: String -> Int
toInt = read ::String -> Int

countDigits :: Int -> Int -> Int
countDigits n k 
  | n == 0 = 0
  | otherwise = 1 + countDigits (div n k) k

main = do
  s <- getLine
  let l = splitOn " " s
  let n = toInt (l!!0)
  let k = toInt (l!!1)
  putStrLn $ show $ countDigits n k
