r, c = [int(i) for i in input().split()]

import operator as op
from functools import reduce, lru_cache

@lru_cache(maxsize=None)
def fib(n):
	if n == 0 or n == 1:
		return n
	else:
		return fib(n-1)+fib(n-2)

@lru_cache(maxsize=None)
def fibSum(n):
	# if n == 1:
	# 	return 0
	# return fibSum(n-1) + fib(n-1)
	count = 0
	for i in range(1, n):
		count+=fib(i)
	return count


@lru_cache(maxsize=None)
def ncr(n, r):
    r = min(r, n-r)
    numer = reduce(op.mul, range(n, n-r, -1), 1)
    denom = reduce(op.mul, range(1, r+1), 1)
    return numer // denom





       
f = [0,1] 
for i in range(2, max(r,c)+2):
    f.append(f[i-1] + f[i-2]) 
    f[i] %= 1000000007

count = 1
count += f[r+1]-1
count += f[c+1]-1

# count += fibSum(r)
# count += fibSum(c)


# for t in range(1, c//2+1):
# 	count += ncr(c-t, t)
# count %= 1000000007
# for t in range(1, r//2+1):
# 	count += ncr(r-t, t)



count *= 2
count %= 1000000007
print(int(count))