mod = 1e9 + 7
n, m = list(map(int, input("").split()))
dp = [[[-1 for i in range(3)] for j in range(3)] for k in range(100005)]

dp[1] = 2
dp[2] = 4

for i in range(3, max(n, m)+2):
    dp[i] = (dp[i-1]+dp[i-2])%mod

ans = int((dp[n] + dp[m] -2) % mod)
print(ans)