import java.util.*;
import java.io.*;

public class Solution{

	public static Integer INT(String s) {
		return Integer.parseInt(s);
	}
	public static Long LONG(String s) {
		return Long.parseLong(s);
	}

	static int mod=1_000_000_007, oo=Integer.MAX_VALUE, _oo=Integer.MAX_VALUE;

	//==================================================================================================================================================



	public static void main(String args[]) throws IOException {
 
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));	Scanner in=new Scanner(System.in); StringBuilder out=new StringBuilder();
		
		int r=in.nextInt(),
			c=in.nextInt();

		int same, diff, temp;

		System.out.println((solve(r)+solve(c)-2)%mod);
	}

	public static int solve(int n) {
		int same=0, diff=2;
		for(int i=1; i<n; i++) {
			int temp=same;
			same=diff;
			diff=(diff+temp)%mod;
		}

		return (same+diff)%mod;
	}
}