dp = [int(0)]*100005
n, m = map(int, input().split())
N = max(n,m)
dp[1], dp[2] = 2, 4
Mod = 10**9+7
for i in range(3, N+1):
    dp[i] = (dp[i-1]+dp[i-2])%Mod
ans = dp[n]
for i in range(2,m+1):
    ans = (ans+dp[i]-dp[i-1])%Mod
ans = (ans+Mod)%Mod
print(ans)