main :: IO () main = do a <- readLn b <- readLn print $ solve a b solve :: Integer -> Integer -> Int solve a b = if abs (b1 - b) < abs (b2 - b) then 1 else 2 where b1 = a * (200000 `div` 5000) b2 = a * (200000 ^ 2 `div` 5000 ^ 2)