import java.util.*;
import java.io.*;
public class EdC {

	public static void main(String[] args) throws Exception{
		int num = 1000000007;
		long[] fib = new long[100005];
		fib[0] = 1;
		fib[1] = 1;
		for(int j = 2;j<=100004;j++){
			fib[j] = (fib[j-1] + fib[j-2])%num;
		}
		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
 		
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int n = Integer.parseInt(st.nextToken());
	 		int m = Integer.parseInt(st.nextToken());
	 	out.println((2*(fib[n]+fib[m]-1))%num);
 		
 		
 		out.println();
	 		
 		out.close();
 		
 		
 		
 	}
}
 	
 
//StringJoiner sj = new StringJoiner(" "); 
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is

 		
 		
 		
 		
	


