n, m = [int(i) for i in input().split()]

def fib(n):
    a, b = 1, 1
    for i in range(n):
        a, b = b, (a + b) % 1000000007

    return a

res1 = 2 * (fib(n) + fib(m) - 1) % 1000000007
print(res1)

