Var A0,A1,A2,M:integer; Begin A0:=1; A1:=1; Write('M = ');ReadLn(M); Repeat A2:=A0+A1; A0:=A1; A1:=A2; Until A2>M; WriteLn(A2); End.