Var
a: array[0..1] of double;
n: integer;
s, t: string;
const eps = 0.001;
begin
a[1] := 1;
a[0] := 2;
n := 2;
s := '1 2 ';
repeat
inc(n);
a[n mod 2] := (a[(n+1) mod 2] + a[n mod 2])/2;
str(a[n mod 2], t);
s := s + t + ' ';
until abs(a[(n+1) mod 2] - a[n mod 2]) writeln('N = ', n);
writeln(s)
end.