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

def create_dp(x):
    dp = [0 for _ in range(x)]
    dp[0] = 1
    if x == 1:
        return dp
    dp[1] = 2
    if x == 2:
        return dp
    
    for i in range(2,x):
        dp[i]  = dp[i-1] + dp[i-2]
        dp[i] %= MOD
    
    return dp

MOD = 10**9+7

cut_pattern = 0

dp = create_dp(max(n,m))
cut_pattern += dp[n-1]*2
cut_pattern += dp[m-1]*2

cut_pattern -= 2

cut_pattern %= MOD

print(cut_pattern)