# Числа Фибоначчи

N = int(input())
F0 = 0
F1 = 1
i = 2
answer = 0
while i <= N:
    answer = F0 + F1
    F0 = F1
    F1 = answer
    i += 1
if N == 0:
    print(0)
elif N == 1:
    print(1)
else:
    print(answer)

3383a8243b7c5ef5b0ed98fc5cdf1efe401a0da0
<mask token>

<mask token>
while i <= N:
    answer = F0 + F1
    F0 = F1
    F1 = answer
    i += 1
if N == 0:
    print(0)
elif N == 1:
    print(1)
else:
    print(answer)

N = int(input())
F0 = 0
F1 = 1
i = 2
answer = 0
while i <= N:
    answer = F0 + F1
    F0 = F1
    F1 = answer
    i += 1
if N == 0:
    print(0)
elif N == 1:
    print(1)
else:
    print(answer)

# Числа Фибоначчи

N = int(input())
F0 = 0
F1 = 1
i = 2
answer = 0
while i <= N:
    answer = F0 + F1
    F0 = F1
    F1 = answer
    i += 1
if N == 0:
    print(0)
elif N == 1:
    print(1)
else:
    print(answer)
