import decimal


def nth_fib(x, _len):
    """Calculating nth term through Binet's formula with accurate intefer precision"""
    decimal.getcontext().prec = _len * 2
    nth_fib = (
        (1 + decimal.Decimal(5).sqrt()) ** x - (1 - decimal.Decimal(5).sqrt()) ** x
    ) / (2 ** x * decimal.Decimal(5).sqrt())
    return int(nth_fib)