var x,t,s:real;
n,i:integer;
begin
write('x=');
readln(x);
repeat
write('n>0 n=');
readln(n);
until n>0;
t:=1;
s:=t;
for i:=1 to n do
t:=t*x*x/i;
s:=s+t*(2*i+1);
end;
write('S=',s:0:4)
end.
var x,t,s:real;
n,i:integer;
begin
write('x=');
readln(x);
repeat
write('n>0 n=');
readln(n);
until n>0;
t:=1;
s:=t;
for i:=1 to n do
begin
t:=t*x*x/i;
s:=s+t*(2*i+1);
end;
write('S=',s:0:4)
end.