Untitled

mail@pastecode.io avatar
unknown
python
7 months ago
149 B
1
Indexable
Never
def f(n):
    if n == 1:
        return 1
    elif n == 2:
        return 1
    else:
        return f(n-2) + f(n-1)

n = (int)(input())

print(f(n))
Leave a Comment