local x, y, x1, y1 = io.read("*n", "*n", "*n", "*n") local ma = math.abs if((ma(x) == ma(y)) and x * y1 == y * x1 and 0 < x * x1) then print(ma(x) + 1) else print(math.max(ma(x), ma(y))) end