let [| x; y |] = stdin.ReadLine().Split() |> Array.map int let isZero = x = 0 && y = 0 let isTateYoko = x * y = 0 let isNaname = abs x = abs y if isZero then 0 elif isTateYoko || isNaname then 1 else 2 |> printfn "%d"