from sys import stdin


def input():
    return stdin.readline()[:-1]


def intput():
    return int(input())


def sinput():
    return input().split()


def intsput():
    return map(int, sinput())

mod = 10 ** 9 + 7

n, m = intsput()

fib = [2, 2]

for _ in range(100001):
    fib.append((fib[-1] + fib[-2]) % mod)


print((fib[n] + fib[m] - 2) % mod)
