program Bai_1;
uses crt;
var n,i:integer; s:real;
begin
clrscr;
write('Nhap n: '); readln(n);
for i:=1 to n do s:=s+1/(2*i);
write('S=',s);
readln;
end.
program Bai_2;
uses crt;
var n,i:integer; gt:longint; s:real;
begin
clrscr;
write('n='); readln(n);
gt:=1;
for i:=1 to n do
begin
gt:=gt*i;
s:=s+1/gt;
end;
write('S=',s);
readln;
end.