let a = Array.map decimal <| stdin.ReadLine().Split(' ') let x,y = a.[0],a.[1] if x = 0M || y = 0M then int(max x y * 2M + 1M) else int(sqrt(float(x*x+y*y))*2.)+1 |> printfn "%d"