import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class A1239 {
    private static final int LIMIT = 100_000;
    private static final long MOD = 1_000_000_007;

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());

        int m = Integer.parseInt(st.nextToken());
        int n = Integer.parseInt(st.nextToken());
        long[] fibonacci = new long[LIMIT + 1];
        fibonacci[0] = 1;
        fibonacci[1] = 1;
        for (int i = 2; i <= LIMIT; i++) {
            fibonacci[i] = (fibonacci[i - 1] + fibonacci[i - 2]) % MOD;
        }
        System.out.println(((fibonacci[m] + fibonacci[n] - 1) * 2) % MOD);
    }
}
