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

mod = 10**9+7

p1 = 2
p2 = 0

ans = 2
n -= 1
while n:
    ans = (ans+p1) % mod
    p1, p2 = (p1+p2)%mod, p1
    n-=1

p1 = 2
p2 = 0
m -= 1

while m:
    ans = (ans+p1) % mod
    p1, p2 = (p1+p2)%mod, p1
    m-=1

print(ans)


