def main():
    mod = 1000000007
    a = [1,1,1]
    b = [1,1,1]
    c = [1,1,1]
    a[1] = 2
    a[2] = 4
    b[1] = 0
    b[2] = 2
    c[1] = 0
    c[2] = 2
    for i in range(3,100001):
        a.append(a[i-1]+a[i-2])
        a[i] %= mod
        b.append(b[i-1]+b[i-2])
        b[i] %= mod
        c.append((c[i-1]+b[i])%mod)

    n,m = input().split()
    n = int(n)
    m = int(m)
    print((a[n]+c[m])%mod)

main()