import math


def fib(n):
    """
    Return Fibonacci value by specified number as integer.
    Golden ratio —
    https://en.wikipedia.org/wiki/Golden_ratio
    Fibonacci's relation to the golden ratio —
    https://en.wikipedia.org/wiki/Fibonacci_number#Closed-form_expression
    """
    golden_ratio = (1 + math.sqrt(5)) / 2

    val = (golden_ratio ** n - (1 - golden_ratio) ** n) / math.sqrt(5)

    return int(val)