Lucas numbers are numbers in a sequence defined like this:
```
L(0) = 2
L(1) = 1
L(n) = L(n-1) + L(n-2)
```
Your mission is to complete the function that returns the `n`th term of this sequence.
**Note:** It should work for negative numbers as well; how you do this is you flip the equation around, so for negative numbers: `L(n) = L(n+2) - L(n+1)`
## Examples
```
L(-10) = 123
L(-5)  = -11
L(-1)  =  -1
L(0)   =   2
L(1)   =   1
L(5)   =  11
L(10)  = 123
```
def lucasnum(n):
    if n == 1:
        return 1
    elif n == 0:
        return 2
    elif n > 1:
        a, b = 2, 1
        for i in range(n):
            a, b = b, a+b
        return a
    else:
        a, b = -1, -2
        for i in range(abs(n)):
            a, b = b, a-b
        return b*-1
def lucasnum(n):
    if n == 1:
        return 1
    elif n == 0:
        return 2
    elif n > 1:
        a, b = 2, 1
        for i in range(n):
            a, b = b, a+b
        return a
    else:
        a, b = -1, -2
        for i in range(abs(n)):
            a, b = b, a-b
        return b*-1