from sys import stdin
input = stdin.readline
MOD = 1_000_000_007

n, m = [int(x) for x in input().split()]
dp = [1, 1]
for i in range(max(n, m) + 1):
    dp.append((dp[-2] + dp[-1]) % MOD)
x = dp[m] * 2
y = dp[n] * 2
ans = (x + y - 2) % MOD
print(ans)