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

public class Main {
    private static int mod = 1_000_000_007;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
       int n, m;
       n = in.nextInt();
       m = in.nextInt();
       int[] f = new int[Math.max(n, m) + 1];
       f[0] = 1;
       f[1] = 1;
       for (int i = 2; i < f.length; i++) {
           f[i] = f[i - 1] + f[i - 2];
           f[i] %= mod;
       }
       out.println((2 * ((f[n] + f[m] - 1) % mod)) % mod);
       out.close();
    }
}
