
import java.util.Scanner;

public class Main {
	public static int maxn=100010,n,m,mod=1000000007;
	public static long ans=0;
    public static long fib(int n) {
        if(n < 2)
            return n;
        long f = 0, g = 1;
        long result = 0;
        for(int i = 1; i < n; i++){
            result = f + g;
            result%=mod;
            f = g;
            g = result;
        }
        return result;
    }
		public static void main(String args[]) {
		Scanner sc=new Scanner(System.in);
		n=sc.nextInt()+1;
		m=sc.nextInt()+1;
		System.out.println((long)((fib(n)+fib(m)-1)*2)%1000000007);
	}
}
