function factorial(x:real): real;
begin
if x = 1 then factorial := 1
else factorial := x * factorial(x-1);
end;
function F(n:integer; x:integer): real;
if n = 1 then F:=3*sqr(x)/2
else F:=exp(n*ln(3))*exp(2*n*ln(x))/factorial(2*n) + F(n-1, x);
var n,x:integer;
x := 2;
n := 50;
write(F(n,x):0:2);
end.
function factorial(x:real): real;
begin
if x = 1 then factorial := 1
else factorial := x * factorial(x-1);
end;
function F(n:integer; x:integer): real;
begin
if n = 1 then F:=3*sqr(x)/2
else F:=exp(n*ln(3))*exp(2*n*ln(x))/factorial(2*n) + F(n-1, x);
end;
var n,x:integer;
begin
x := 2;
n := 50;
write(F(n,x):0:2);
end.