main = do x<- fmap read getLine y<- fmap read getLine l<- fmap read getLine let x_move=ceiling$abs$x/l let y_move=ceiling$abs$y/l let change_num=(if x/=0 then 1 else 0)+(if y<0 then 1 else 0) putStrLn$show$x_move+y_move+change_num