

n,m = map(int, input().split())


def fib(x):
    
    a = 0
    b = 1

    temp = 0
    for i in range(0, x):
        temp = a + b
        a = b
        b = temp
            
    return temp
    
print(2*(fib(n) + fib(m) - 1)%(10**9+7))