program fibonachi3; uses SysUtils; {$APPTYPE CONSOLE} var f1,f2,f3:string; os, n,i,j:integer; begin readln(n); f1:='1';f2:='1'; for i:=2 to n do begin os:=0; for j:=1 to length(f2) do begin f3[i]:=inttostr((strtoint(f1[i])+strtoint(f2[i])+os) mod 10); ost:=(strtoint(f1[i)+strtoint(f2[i]+os)div 10); end; if os>0 then begin f3[length(f3)+1]:=inttostr(os);end; f1:=f2; f2:=f3; writeln(i,' ',f2); end; readln; end.