a = list(map(int, input().split())) 
T = max(a[0],a[1]) 
tab = [1 for k in range(T+1)]
for k in range(2, T+1) : 
    tab[k] = (tab[k-1] + tab[k-2] ) % int(1e9+7)
print(2*(tab[a[0]] + tab[a[1]]-1) % int(1e9+7))