N = int(1e5+3)
MOD = int(1e9+7)
memo = [0] * N

def dp():
    memo[0] = 2
    memo[1] = 2
    for i in range(2, N):
        memo[i] = (memo[i-1] + memo[i-2]) % MOD

n, m = map(int, input().split())
dp()
print((memo[n] + - 1 + memo[m] - 1) % MOD)
