Submission

Status:

PPPPPPP---

Subtask/Task Score:

70/100

Score: 70

User: phatto

Problemset: Fibonacci Croissant

Language: python

Time: 0.012 second

Submitted On: 2026-09-15 23:28:08

n = int(input())

def fibo(n):
    phi = (1 + 5 ** 0.5) / 2
    conjugate_phi = (1 - 5 ** 0.5) / 2
    return int((phi**n - conjugate_phi**n)/5**0.5)


if n >= 2 and n <= 90:
    totalsum = 0
    for i in range(n+1):
        totalsum = totalsum + fibo(i)
    print(totalsum)
else:
    print("")