import java.util.Scanner;

public class C {
	//思维题   斐波那契
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		int []arr=new int[100001];
		arr[0]=1;arr[1]=1;
		for(int i=2;i<100001;i++) {
			arr[i]=arr[i-1]+arr[i-2];
			arr[i]=arr[i]%1000000007;
		}
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int m=in.nextInt();
		System.out.println(2*(arr[n]+arr[m]-1)%1000000007);
	}

}
