upto = int(input("Number> ")) fback2 = 0 fback1 = 1 print(0) print(1) while True: fib = fback1 + fback2 if fib < upto: print(fib) else: break fback2 = fback1 fback1 = fib