if __name__ == '__main__':
    arr = [int(0)] * 100005
    n, m = map(int, input().strip().split())
    N = max(n, m)
    arr[1], arr[2] = 2, 4
    Mod = 10 ** 9 + 7
    for i in range(3, N + 1):
        arr[i] = (arr[i - 1] + arr[i - 2]) % Mod
    ans = arr[n]
    for i in range(2, m + 1):
        ans = (ans + arr[i] - arr[i - 1]) % Mod
    ans = (ans + Mod) % Mod
    print(ans)
