eolymp
bolt
Try our new interface for solving problems
Problems

Functional equation

Functional equation

Let $f: R → R, x \ne 0$. $$ 2f(x) + f(1/x) = x $$ Given value of $x$. Find the value of $f(x)$. \InputFile One real number $x, x \ne 0$. \OutputFile Print the value of $f(x)$ with $4$ decimal digits.
Time limit 1 second
Memory limit 128 MiB
Input example #1
1
Output example #1
0.3333
Author Michael Medvediev