main :: IO () main = do [p, k] <- map (read :: String -> Integer) . words <$> getLine print $ ((10 ^ (p - 1) - k) `div` p + 1) `mod` 1000000007