1# Python3 implementation of the approach
2from math import *
3
4# Function to return the previous
5# fibonacci number
6def previousFibonacci(n):
7 a = n/((1 + sqrt(5))/2.0)
8 return round(a)
9
10# Driver code
11n = 8
12print(previousFibonacci(n))
13