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


def fib(number):
    a, b = 1, 1
    for i in range(number):
        a, b = b, (a + b) % mod
    return a


print(2 * (fib(n) + fib(m) - 1) % mod)
