program baidu;var x:longint; y:real;begin readln(x); if x>1 then y:=2*x else if x>=0 then y:=x+2 else y:=x/2; writeln(y:0:2);end.