def fi(num): if( num == 1 or num == 2): return 1 else: return fi(num-1) + fi(num - 2) n = input("请输入一个数字\n") print(fi(int(n)))