program fantscrin;
var n,i,s,f:integer;
begin
write('Введите N = '); readln(n);
s:= 1;
f:=1;
for i:=2 to n do
f:= f * i;
s:=s + f;
end;
writeln('S = ',s);
end.
program fantscrin;
var n,i,s,f:integer;
begin
write('Введите N = '); readln(n);
s:= 1;
f:=1;
for i:=2 to n do
begin
f:= f * i;
s:=s + f;
end;
writeln('S = ',s);
end.