#include #include #include #include using namespace std; int main() { double x,y; scanf("%lf",&x); if (5>x&&x>=0) y=0-x+2.5; else if (10>x&&x>=5) y=2-1.5*(x-3)*(x-3); else y=x/2-1.5; printf("%.3lf\n",y); return 0; }