import math


def fib(n):
    """ Calculates the n-th Fibonacci number iteratively 
    """
    
    if n < 1:
        raise ValueError("expected integer")
    if math.floor(n) != n:
        raise ValueError("n must be exact integer")
    a, b = 1, 1
    for i in range(2, n+1):
        a, b = b, a + b
    return a