1451: 分段函数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:4 Solved:3

Description

编写程序,计算下列分段函数y=f(x)的值。
y=-x+2.5; 0 <= x < 5
y=2-1.5(x-3)(x-3); 5 <= x < 10
y=x/2-1.5; 10 <= x < 20

Input

一个浮点数x

Output

输出函数的值y 

Sample Input Copy

1.0

Sample Output Copy

1.5