import java.util.Scanner;
public class ivanthefool {
	
	static int fib(int n) 
    { 
        int a = 0, b = 1, c; 
        if (n == 0) 
            return a; 
        for (int i = 2; i <= n; i++) 
        { 
            c = (a + b)%1000000007; 
            if (c<0) {
            	c+= 1000000007;
            }
            a = b; 
            b = c; 
        } 
        return b; 
    } 


	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int m = sc.nextInt();
		int kevin =(2*fib(n+1)+2*fib(m+1)-2)%(1000000007);
		if (kevin<0) {
			kevin += 1000000007;
		}
		
		System.out.println(kevin);
		
	}

}
