program al;
var n,i:integer;
k,b,a1,p:integer;
s:real;
begin
writeln('n=');
readln (n);
a1:=2;
b:=3;
p := 1;
s:=0;
for i:=1 to n do
begin
p := p * a1;
a1 := a1 + b;
end;
for i:= 1 to n do
begin
k:= 2*a1+b*(n-1);
s:=(k/2)*n;
end;
WriteLn('proizvedenie: ',p ,' summa=',s);
Readln;
end.