import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main {
    static long inf = Long.MAX_VALUE / 2;
    static int mod = (int) 1e9 + 7;


    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        int n = nextInt();
        int m = nextInt();
        long[] dp = new long[100002];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i < 100002; i++) {
            dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
        }
        out.print(2 * (dp[n] + dp[m] - 1));
        out.close();
    }


    static PrintWriter out;
    static BufferedReader br;
    static StringTokenizer st = new StringTokenizer("");

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static String next() throws IOException {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
}
