Array = [0,1] 
  
def fibonacci(n): 
    a = 0
    b = 1
    if n == 0: 
        return a 
    elif n == 1: 
        return b 
    else: 
        for _ in range(2,n): 
            c = a + b 
            a = b 
            b = c 
        return b 

n, m = list(map(int, input().split()))

print((2*(fibonacci(n + 2) + fibonacci(m + 2) - 1) ) % 1000000007)

	  	     	     					 		 	 	   	