// Why do we fall ? So we can learn to pick ourselves up.
// http://tech-queries.blogspot.com/2011/07/fit-12-dominos-in-2n-strip.html
import java.util.*;
public class solve {
    static int mod = 1000000007;
    public static void main(String[] args) {
        int[] fib = new int[100001];
        fib[1] = 1;
        fib[2] = 2;
        for(int i=3; i<100001; i++) {
            fib[i] = (fib[i - 1] + fib[i - 2])%mod;
        }
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        System.out.println(2*(fib[n]+fib[m]-1)%mod);
    }
}
