open System let X,Y = let t = Console.ReadLine().Split() |> Array.map(int) t.[0],t.[1] match X,Y with | _ when X = Y -> 0 | 0,_ -> 2 | _,0 -> 1 | _ when X = -Y -> 3 | _ -> -1 |> printfn "%i"