a, b, c = io.read("*n", "*n", "*n") if(a == b) then print(a) else print((c - a)*(c - b) / (b - a) + b) end