a,b = map(int, input(). split())
if a==1 and b==1:
    print(2)
else:
    d = max(a,b)*[0]
    d[0] = 1
    d[1] = 2
    for i in range(2,len(d)):
        d[i] = (d[i-1]+d[i-2])
    print(2*(d[a-1]+d[b-1]-1)%(10**9+7))