import sys,math,itertools
from collections import Counter,deque,defaultdict
from bisect import bisect_left,bisect_right 
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,m = inpl()
a = [1,1]
for i in range(10**5+10):
    a.append((a[-1]+a[-2])%mod)
res = a[m]
ac = [0]
for x in a:
    ac.append((ac[-1]+x)%mod)
res += ac[n-1]
print((res*2)%mod)