#Z13203. 分段函数

分段函数

Description

Write a program to compute the value of the following piecewise function y=f(x)y=f(x). The result should be rounded to three decimal places.

y=x+2.5;y=-x+2.5; 0x<50≤x<5
y=21.5(x3)(x3);y=2-1.5(x-3)(x-3); 5x<105≤x<10
y=x21.5;y=\frac{x}{2}-1.5; 10x<2010≤x<20

Input Format

A floating-point number N(0N<20)N(0 ≤ N < 20).

Output Format

Output the value of the piecewise function corresponding to NN: f(N)f(N).
The result should be rounded to three decimal places.

1.0

1.500