
import java.util.*;
import java.io.*;
public class IvanTheFool
{
	public static void main(String[] args) 
	{
		Scanner scan = new Scanner(System.in);
		int r = scan.nextInt();
		int c = scan.nextInt();

        setupFib(Math.max(r,c));

		long count = 1;

        count += fibSum(r);
        count += fibSum(c);
        count%=1000000007;


        count*=2;
		System.out.println(count);
	}

    static long fibSum(int n)
    {
        long count = 0;
        for(int i = 1;i<n;i++)
        {
            count += f[i];
            count%=1000000007;
        }
        return count;
    }

    static long f[];

    static void setupFib(int n) 
    { 
        /* Declare an array to store Fibonacci numbers. */
        f = new long[n+2]; // 1 extra to handle case, n = 0 
        int i; 
           
        /* 0th and 1st number of the series are 0 and 1*/
        f[0] = 0; 
        f[1] = 1; 
          
        for (i = 2; i <= n; i++) 
        { 
           /* Add the previous 2 numbers in the series 
             and store it */
            f[i] = f[i-1] + f[i-2]; 
            f[i] %= 1000000007;
        } 
    } 
}