hankei r d2 | d2 == 0 = 1 | r' >= d2 = r * 2 + 1 | r > d2 = r * 2 | otherwise = hankei (r + 1) d2 where r' = r + 1 main = do str <- getLine let [x,y] = map read $ words str :: [Double] d2 = sqrt (x^2 + y^2) print $ truncate $ hankei (max (abs x) (abs y)) d2