import java.util.Arrays;
import java.util.Scanner;

public class p123A{
     static  int M=1000000007;
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        int m=in.nextInt();
        int a[]=new int[100005]; a[1]=2;a[2]=4;
        for(int i=3;i<100005;i++) a[i]=(a[i-1]+a[i-2])%M;
        int ans=(a[n]+a[m]-2)%M;

        System.out.println(ans);
    }
    }