s=1+(1/2)+(1/4)+(1/8)...
var
  s: real;
  i, n: longint;

begin
  Write('N = ');
  Readln(n);
  for i := 0 to n - 1 do
    s := s + 1 / (1 shl i);
  Writeln('S = ', s:0:5);
  Readln
end.