import java.util.*;
import java.io.*;
import java.lang.*;
public class test1{
	/*static double res=0;
	 static void help(int p,int r,int n){
		double tmp=p;
		for(int i=1;i<=n;i++){
			double x=1+(double)r/1200 ;
			tmp*=x;
		}
		res+=tmp;
		int k=100000,m=360;
		for(int i=m;i>0;i--){
			help(k,5,i);
		}
		System.out.println("paid amount "+k*m+" ");
		System.out.println((long)res);
	}
*/
	
public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
         StringBuilder sb=new StringBuilder();
         long M=(long)1e9+7;
        	int n=s.nextInt(),m=s.nextInt();
        	long[] f=new long[Math.max(n,m)+1];
        	f[0]=1;f[1]=1;
        	for(int i=2;i<=Math.max(n,m);i++){
        		f[i]=(f[i-1]+f[i-2])%M;
        	}
        	long res=f[n]+f[m]-1;res=(res*2)%M;
        System.out.println(res);
    }
}
		
	

//0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0









