ai = [0] * 100100
bi = [0] * 100100
n, m = input().split()
n = int(n)
m = int(m)

ai[1] = 2
ai[2] = 4
len = max(n, m)
for i in range(3, len + 1):
    ai[i] = (ai[i - 1] + ai[i - 2]) % 1000000007
# print(ai)
print((ai[n-1] + ai[m]) % 1000000007)

	 		  	 	 				  					 		 		 			