import Control.Applicative import Control.Monad import Data.List import Data.Monoid divCeil x y = (x + y - 1) `div` y f :: Int -> Int -> Int -> Int f x y l | y>=0 && x==0 = divCeil y l | y>=0 = divCeil y l + 1 + divCeil (abs x) l | otherwise = 1 + divCeil (abs x) l + 1 + divCeil (abs y) l main = f <$> readLn <*> readLn <*> readLn >>= print