M = 10**9+7 
array = [0]*100001
array[0] = 1
array[1] = 1
def fib(n):
    if array[n] == 0:
        array[n]=(fib(n-1)+fib(n-2))%M
    return array[n]
for i in range(1,100001):
    fib(i)
n,m=map(int, input().split()) 
print(((array[n]+array[m]-1)*2)%M)