import java.io.*;
import java.util.*;
public class Solution{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int row = sc.nextInt(), col = sc.nextInt(), lim = (int)Math.max(row, col);
        
        long fib[] = new long[lim+1], mod = (long)1e9+7;
        fib[0] = 1;
        fib[1] = 1;
        
        for(int i=2; i<=lim; i++)
            fib[i] = (fib[i-1] + fib[i-2])%mod;
            
        long ans = (2 * (fib[row] + fib[col] - 1)%mod)%mod;
        System.out.println(+ans);
    }
}