program Zif_4_7_g(input,output);
var x:real;
begin
     read(x);
     x:=x-trunc(x/(2*pi))*2*pi;
     if x>pi then x:=cos(x-pi/2)
     else x:=sin(x);
     write(x:0:5);
end.