def f(n): if n == 0: return 0 elif n == 1: return 1 elif n == 2: return 0 else: return f(n-1)*f(n-3) +1 print f(37)