In this problem, given a linear function in the form of
,
where a, b and c are non-zero integers. You are asked to calculate f(x), or calculate the x by giving the f(x) as input.
In the first line, there are three non-zero integers : a, b and c.
Next, there're two integers: d and e. If d=0, print the answer of f(x) where x=e; otherwise, calculate the x value where f(x)=e.
All inputs are ranged in [0, 1000].
Print one line which contains a floating point rounded to third decimal places.
Please print '\n' in the last line.