solve :: Int -> Int
solve x
  | x `mod` 100 == 0 = 1 + solve (x `div` 100)
  | otherwise = 0

main :: IO ()
main = do
  [d, n] <- map read . words <$> getLine
  print . last $ take n [x | x <- [1..], solve x == d]