#include
int main()
{
int x;
double y;
scanf("%d",&x);
if(x<2)
y=-x+2.5;
else
if(x>4)
y=1.5;
else
y=2-1.5*(x-3)/2;
printf("%lf\n",y);
return 0;
}
#include
int main()
{
int x;
double y;
scanf("%d",&x);
if(x<2)
y=-x+2.5;
else
if(x>4)
y=1.5;
else
y=2-1.5*(x-3)/2;
printf("%lf\n",y);
return 0;
}