#using namespace boost::python;

maxn = int(1e5+10)
mod = 1e9+7
dp = [0]*maxn

def Ivan():
    
    n1 = int(input())
    m = int(input())
    dp[1] = 2
    dp[2] = 4
    
    for i in range(3,max(n1,m)):
        dp[i] = (dp[i-1]+dp[i-2])%mod
    
    print (dp[n1]+dp[m]-2)%mod
    print('\n')
    
    return 0
    

