import sys


def input():
    return sys.stdin.readline().rstrip()


MOD = int(1e9 + 7)


def slv():
    n, m = map(int, input().split())
    if n > m:
        n, m = m, n
    DP1 = [0]*(m)
    DP2 = [[0]*2 for i in range(m)]
    DP1[0] = 2
    DP2[0] = [0, 0]
    for i in range(1, m):
        DP1[i] = DP1[i - 1]
        DP2[i][0] = (DP2[i - 1][0] + DP2[i - 1][1]) % MOD
        DP2[i][1] = (DP2[i - 1][0] + DP1[i - 1]) % MOD
    #print(DP2)
    ans = sum(DP2[m - 1]) * sum(DP2[n - 1])
    ans %= MOD
    print(ans)
    return


def main():
    t = 1
    for i in range(t):
        slv()
    return


if __name__ == "__main__":
    main()
