MOD = 10 ** 9 + 7
n, m = map(int, input().split())
fib = [1] * (max(n, m) + 2)
for i in range(2, max(n, m) + 2):
    fib[i] = fib[i - 1] + fib[i - 2]
    fib[i] %= MOD
print(((fib[m] + fib[n]) * 2 - 2) % MOD)