def fib(below=4e6, n=0):
    seq = [1, 2]
    index = 1
    val = 2
    if n == 0:
        while val < below:
            val += seq[index - 1]
            seq.append(val)
            index += 1
        return seq
    elif n > 0:
        while index <= n:
            val += seq[index - 1]
            seq.append(val)
            index += 1
        return seq[n - 1]
    else:
        raise IndexError('n={} is not a valid fibonacci index'.format(n))

085fa3467f4bbd0e33177bc13a4017853467e430
<mask token>

def fib(below=4000000.0, n=0):
    seq = [1, 2]
    index = 1
    val = 2
    if n == 0:
        while val < below:
            val += seq[index - 1]
            seq.append(val)
            index += 1
        return seq
    elif n > 0:
        while index <= n:
            val += seq[index - 1]
            seq.append(val)
            index += 1
        return seq[n - 1]
    else:
        raise IndexError('n={} is not a valid fibonacci index'.format(n))

def fib(below=4e6, n=0):
    seq = [1, 2]
    index = 1
    val = 2
    if n == 0:
        while val < below:
            val += seq[index - 1]
            seq.append(val)
            index += 1
        return seq
    elif n > 0:
        while index <= n:
            val += seq[index - 1]
            seq.append(val)
            index += 1
        return seq[n - 1]
    else:
        raise IndexError('n={} is not a valid fibonacci index'.format(n))
