open System type Sol() = member this.Solve() = let X = stdin.ReadLine() |> int let Y = stdin.ReadLine() |> int let L = stdin.ReadLine() |> int let mutable ans = 0 ans <- if (Y >= 0) && (X = 0) then 0 elif (Y >= 0) then 1 else 2 let aX = abs X let aY = abs Y ans <- ans + aX / L + (if (aX % L) = 0 then 0 else 1) ans <- ans + aY / L + (if (aY % L) = 0 then 0 else 1) printfn "%d" ans let mySol = new Sol() mySol.Solve()