```python
def fib(n):
    if n <= 0:
        return 0
    elif n == 1: