13271 - Linear Function   

Description

In this problem,  given a linear function in the form of

 ,

where ab and c are non-zero integers. You are asked to calculate f(x), or calculate the x by giving the f(x) as input.

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].

Output

Print one line which contains a floating point rounded to third decimal places.

Please print '\n' in the last line.

Sample Input  Download

Sample Output  Download

Tags




Discuss