Function Sum(n:integer):real;
Var
F,St,S:real;
i:integer;
Begin
F:=1;
S:=0;
For n:= 1 to n do
Begin
F:=F*n;
St:=1;
For i:= 1 to n do
St:=St*n;
S:=S+(St+1)/F;
End;
Sum:=S;
End;
Var
n:integer;
Begin
Write('n = ');ReadLn(n);
WriteLn('Сумма: ',Sum(n))
End.