mod = int(10**9 + 7)
n, m = map(int, input().split())

dp = [1, 1]
for x in range(2, max(n, m)+1):
    dp.append(0)
    dp[x] = (dp[x-1] + dp[x-2]) % mod

sol = (2 * (dp[n] + dp[m] - 1) % mod) % mod
print(sol)
