import java.util.*;

public class IvanTheFool2 {

	static int MOD = 1000000007;

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr = new int[100000];
		arr[0] = 2;
		arr[1] = 4;
		for (int i = 2; i < arr.length; i++) {
			arr[i] = arr[i - 1] + arr[i - 2];
			arr[i] = arr[i] % MOD;
		}
		
		long sol=((arr[m-1]+arr[n-1])-2)%MOD;
		
		System.out.println(sol);

	}

	
}