from fractions import gcd
from math import factorial, ceil, sqrt, atan2, log, pi, e, asin,acos, cos, sin, floor, atan
from itertools import *
from fractions import Fraction
import string
import copy
import random
import bisect
from decimal import *
from collections import deque
from sys import *
digs = string.digits + string.ascii_letters
 
def id_generator(size=20, chars='ABCDEFGHIJ'):
    return ''.join(random.choice(chars) for _ in range(size))
 
def mp():
    return map(int,str(raw_input()).strip().split())
 
clear=stdout.flush()
 
mod = 1000000007 
 
n,m=mp()
dp=[0 for i in range(100005)]
if n>m:
	n,m=m,n
dp[0]=0
dp[1]=2
dp[2]=4
for i in range(3, m+1):
	dp[i]=dp[i-1]+dp[i-2]
	dp[i]%=mod
print (dp[n]+dp[m]-2+mod)%mod