Help me in solving RECUR05 problem

My issue

def fib(n):
write your code here
if n <= 0:
return 0
elif n == 1:
return 1
elif n == 2:
return 1
else:
return fib(n - 1) + fib(n - 2)

n = int(input())
print(fib(n))

My code

def fib(n):
    #Write your code here
   if n <= 0:
       return 0
       elif n == 1:
           return 1
           elif n == 2:
               return 1
           else:
               return fib(n - 1) + fib(n - 2)
       
n = int(input())
print(fib(n))

Learning course: Design and Analysis of Algorithms
Problem Link: Fibonacci Series in Design and Analysis of Algorithms