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

tmp = [0] * 100010
tmp[1] = 2
tmp[2] = 2

dp = [[0]*100010 for i in range(2)]

dp[1][1] = 2
dp[1][2] = 2
dp[0][2] = 2
for i in range(2,100009):
    dp[0][i+1] = dp[1][i]
    dp[1][i+1] = dp[1][i] + dp[0][i]
    dp[0][i+1] %= MOD
    dp[1][i+1] %= MOD


sum_yoko = dp[0][m] + dp[1][m]
ans = sum_yoko - 2
sum_tate = dp[0][n] + dp[1][n]
ans += sum_tate
print(ans % MOD)


