# -*- coding: utf-8 -*-

import sys

def modulo_div(a, b, modulo):
    if b == 1:
        return a % modulo
    return (a + modulo_div(- a, modulo % b, b) * modulo) // b % modulo

for line in sys.stdin.readlines():
    inputs = line.split()
    n = int(inputs[0])
    m = int(inputs[1])

numer = 1
denom = 1
sums = 0
modulo = 10 ** 9 + 7
import time
fibonacci = [1, 1]
for i in range(max(n, m) + 1):
    fibonacci.append((fibonacci[- 1] + fibonacci[- 2]) % modulo)
sums += (fibonacci[n] + fibonacci[m] - 1) * 2 % modulo
#for k in range(1, (n + 2) // 2):
#    denom = denom * k * (n - k + 1) % modulo
#    numer = numer * (n - 2 * k + 1) * (n - 2 * k + 2) % modulo
#    sums = (sums + modulo_div(numer, denom, modulo)) % modulo
#numer = 1
#denom = 1
#for k in range(1, (m + 2) // 2):
#    denom = denom * k * (m - k + 1) % modulo
#    numer = numer * (m - 2 * k + 1) * (m - 2 * k + 2) % modulo
#    sums = (sums + modulo_div(numer, denom, modulo)) % modulo

#sums = sums * 2 % modulo
print(sums)
