program cosx(input,output);
const eps=0.0000000000000001;
var a,x,y:real;
    k:integer;
begin
    write('vvedite x'); read(x);
    a:=1;k:=1;y:=1;
    while abs(a)>=eps do
       begin
       a:=-a*x*x/k/(k+1); y:=y+a; k:=k+2 end;
    writeln('cosx=',y:1:4)
end.