n,m=map(int,input().split())
a=[]
for i in range(100001):
    a.append(0)
a[0]=0
a[1]=2
a[2]=4
for i in range(3,100001):
    a[i]=(a[i-1]%1000000007+a[i-2]%1000000007)%1000000007
print((a[n]%1000000007+a[m]%1000000007-2)%1000000007)