Program my_prog;
var
i, n: integer;
S : real;
begin
writeln( 'This program compute the sum = 1 + (1/2) + (1/4) + ... + (1/(2*n))');
write('Enter the up limit of Sum, n=: ');
readln(n);
S:=1;
for i:=1 to n do S:=S + (1/(2*i));
writeln('Sum = ', S);
end.