// package Quarantine;

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

public class IvanTheFool {
    public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer(br.readLine());
        int f[]=new int[100001];
        int mod=1000000007;
        f[1]=1;
        f[2]=2;
        for(int i=3;i<=100000;i++){
            f[i]=(f[i-1]+f[i-2])%mod;
        }
        int n=Integer.parseInt(st.nextToken());
        int m=Integer.parseInt(st.nextToken());
        long ans=(0l+f[n]+f[m]-1+mod)%mod;
        ans=(ans*2)%mod;
        System.out.println(ans);
    }
}
