def main():
	import sys
	input = sys.stdin.readline
	
	MOD = 1000000007
	fib = [0] * 100010
	fib[0] = 1
	fib[1] = 1
	for i in range(2, 100010):
		fib[i] = (fib[i - 1] + fib[i - 2]) % MOD
	
	n, m = list(map(int, input().split()))
	
	if n > m:
		n, m = m, n
	
	if n == 1:
		print(2 * fib[m])
		return 0
	
	ans1 = fib[m - 1] + fib[m - 2]
	ans2 = fib[n - 1] + fib[n - 2]	
	print((2 * (ans1 + ans2 - 1)) % MOD)
	
	return 0

main()
