var x,s,p,p1: real;i,n:integer;
begin
readln (x,n);
s:=1;
p:=1;
p1:=1;
i:=2;
while i<=n do
p:=(-1)*p*x*x;write('p=',p);
p1:=p1*i*(i-1);write(' p1=',p1);
s:=s+p/p1; writeln(' i=',i,' s=',s);
i:=i+2;
writeln;
end;
if n=1 then write(1) else writeln( 's= ', s);
end.
var x,s,p,p1: real;i,n:integer;
begin
readln (x,n);
s:=1;
p:=1;
p1:=1;
i:=2;
while i<=n do
begin
p:=(-1)*p*x*x;write('p=',p);
p1:=p1*i*(i-1);write(' p1=',p1);
s:=s+p/p1; writeln(' i=',i,' s=',s);
i:=i+2;
writeln;
end;
if n=1 then write(1) else writeln( 's= ', s);
end.