from sys import stdin

add = lambda a, b: (a + b) % mod
mult = lambda a, b: ((a % mod) * (b % mod)) % mod
mod = 10 ** 9 + 7

n, m = sorted([int(x) for x in stdin.readline().split()])
mem = [1, 1]
for i in range(2, m + 1):
    mem.append(add(mem[i - 1], mem[i - 2]))

# print(mem)
print(mult(2, add(add(mem[m], mem[n]), -1)))
