I love Fibonacci numbers in general, but I must admit I love some more than others. 
I would like for you to write me a function that when given a number (n)  returns the n-th number in the Fibonacci Sequence.
For example:
```python
   nth_fib(4) == 2
```
Because 2 is the 4th number in the Fibonacci Sequence.
For reference, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two.
def nth_fib(n):
  n -= 1
  if n == 0: return 0
  if n == 1: return 1
  a, b, p, q = 1, 0, 0, 1
  
  while n > 0:
    if n % 2 == 0:
      tp = p
      p = p ** 2 + q ** 2
      q = 2 * tp * q + q ** 2
      n //= 2
    else:
      ta = a
      a = b * q + a * q + a * p
      b = b * p + ta * q
      n -= 1
  return b
def nth_fib(n):
  n -= 1
  if n == 0: return 0
  if n == 1: return 1
  a, b, p, q = 1, 0, 0, 1
  
  while n > 0:
    if n % 2 == 0:
      tp = p
      p = p ** 2 + q ** 2
      q = 2 * tp * q + q ** 2
      n //= 2
    else:
      ta = a
      a = b * q + a * q + a * p
      b = b * p + ta * q
      n -= 1
  return b