import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class contest {
	static long A = 1000000000+7;
	static long[] fib = new long[100002];
	public static long fib(int n) {
		if(n<0)return 0;
		if(fib[n]!=0)return fib[n];
		fib[0]=1;
		fib[1]=2;
		fib[2]=4;
		for(int i=3;i<=n;i++) {
			fib[i]=(fib[i-1]%A+fib[i-2]%A)%A;
		}
		return fib[n];
	}
	public static long f(int n ,int m) {
		long r=(fib(n)+fib(m)-2)%A;

		return r;
	}
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		System.out.println(f(sc.nextInt(),sc.nextInt()));
		pw.flush();
		pw.close();
	}

}