program k;
var x:real;
n:integer
function f(y:real,j:integer):real;
begin
f:=1
for k:=1 to j do begin
f:=f*y;
end;
readln(x,n);
s:=1;
for i=1 to n do begin
s:=s+f(-1,i)*f(x,2*i+1)
writeln(s);
end.
program k;
var x:real;
n:integer
function f(y:real,j:integer):real;
begin
f:=1
for k:=1 to j do begin
f:=f*y;
end;
end;
begin
readln(x,n);
s:=1;
for i=1 to n do begin
s:=s+f(-1,i)*f(x,2*i+1)
end;
writeln(s);
end.