fork download
  1. # your code goes here
  2. n=int(input())
  3.  
  4. def fibo(n):
  5. if n == 0:
  6. return 0
  7. elif n==1 or n==2:
  8. return 1
  9. else:
  10. return fibo(n-1) + fibo(n-2)
  11.  
  12. print(fibo(n))
Success #stdin #stdout 0.03s 9244KB
stdin
12
stdout
144