import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        long arr[]=new long[100001];
        arr[0]=1;
        arr[1]=1;
        for(int i=2;i<=100000;i++)
        arr[i]=(arr[i-1]+arr[i-2])%1000000007;
        String str[]=br.readLine().split(" ");
        int n=Integer.parseInt(str[0]);
        int m=Integer.parseInt(str[1]);
        pw.println(2*(arr[n]+arr[m]-1)%1000000007);
        pw.flush();
        pw.close();
    }
}