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

public class Main {

    static FastReader in;
    static PrintWriter out;
    static int N = 100_100;
    static long[] dp;
    static int mod = 1000000007;

    static void solve() {
        int n = in.nextInt();
        int m = in.nextInt();

        dp = new long[N];
        dp[1] = 1;
        dp[2] = 2;
        for (int i = 3; i < N; i++) {
            dp[i] = (dp[i - 2] + dp[i - 1]) % mod;
        }

        long ans = 2 * (dp[n] + dp[m] - 1) % mod;

        out.println(ans);
    }

    public static void main(String[] args) {
        in = new FastReader(System.in);
//        in = new FastReader(new FileInputStream("input.txt"));
        out = new PrintWriter(System.out);
//        out = new PrintWriter(new FileOutputStream("output.txt"));

        int q = 1;

        while (q-- > 0)
            solve();

        out.close();
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        FastReader(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

        Integer nextInt() {
            return Integer.parseInt(next());
        }

        Long nextLong() {
            return Long.parseLong(next());
        }

        Double nextDouble() {
            return Double.parseDouble(next());
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(nextLine());
            }
            return st.nextToken();
        }

        String nextLine() {
            String s = "";
            try {
                s = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return s;
        }
    }
}
