from sys import stdin
inp = stdin.readline

n,m = [int(x) for x in inp().strip().split()]

a = [0] * 100001
a[1] = 1
a[0] = 1
mod = (10**9+7)
for i in range(2,100001):
    a[i] = (a[i-1]+ a[i-2])%mod

print((2*(a[n]+a[m]-1))%mod)