import Control.Monad.ST
import Data.Char


readInt :: IO Int
readInt = read <$> getLine :: IO Int

readIntSplit :: IO [Int]
readIntSplit = map read . words <$> getLine :: IO [Int]

readStr :: IO String
readStr = getLine

readStrSplit :: IO [String]
readStrSplit = map read . words <$> getLine

solve :: Int -> Int -> Int -> Int
solve n k x
  | n <= k^x-1 = x
  | otherwise = solve n k (x+1)

main :: IO ()
main = do
  [n, k] <- readIntSplit
  print $ solve n k 1