from collections import defaultdict
from math import sqrt,factorial,gcd,log2,inf
# map(int,input().split())
# l = list(map(int,input().split()))
mod = 10**9 + 7
import sys
sys.setrecursionlimit(10**9)

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

dp = [0]*(n+m+1)
dp[1] = 1
dp[0] = 0
for i in range(2,n+m+1):
    dp[i] = dp[i-1]%mod+dp[i-2]%mod
    dp[i]%=mod
# print(dp)
print((2*(dp[n+1]+dp[m+1]-1))%mod)


