#用到了递归函数,其中要注意全局变量的定义 def accrue(month, n, num1): global i for i in range(month + 2, n + 1): num1 = num1 +1 num1 = accrue(i, n, num1) return num1 while True: try: n = int(input()) num = accrue(1, n, 1) print(num) except: break