import java.lang.*;
import java.util.*;
import java.io.*;

public class Main {
    void solve(){
         int n=ni(),m=ni();
         long f[]=new long[100001];
         f[1]=2;
         f[2]=2;
         for(int i=3;i<=100000;i++) f[i]=add(f[i-1],f[i-2]);
         long pref[]=new long[100001];
         for(int i=1;i<=100000;i++) pref[i]=add(pref[i-1],f[i]);
         long ans=2;
         ans=add(ans,pref[n-1]);
         ans=add(ans,pref[m-1]);
         pw.println(ans);

    }
    long add(long a,long b){
        a+=b;
        if(a>=M) a-=M;
        return a;
    }
    int a[][];
    long go(int i,int j,int n,int m){

        if(j>m){
            i++;
            j=1;
        }
        if(i>n){
            for(int ii=1;ii<=n;ii++){
                for(int jj=1;jj<=m;jj++){
                    int cc=0;
                    if(ii-1>=1) {
                        if(a[ii-1][jj]==a[ii][jj])cc++;
                    }
                    if(ii+1<=n){
                        if(a[ii+1][jj]==a[ii][jj]) cc++;
                    }
                    if(jj-1>=1){
                        if(a[ii][jj-1]==a[ii][jj]) cc++;
                    }
                    if(jj+1<=m) if(a[ii][jj+1]==a[ii][jj]) cc++;
                    if(cc>1) return 0;
                }
            }
            return 1;

        }
        long ans=0;
        if(i-1>=1 && j-1>=1){
            if(a[i-1][j]==a[i][j-1]){
                a[i][j]=a[i-1][j]^1;
                ans+=go(i,j+1,n,m);
            }else {
                a[i][j]=0;
                ans+=go(i,j+1,n,m);
                a[i][j]=1;
                ans+=go(i,j+1,n,m);
            }
        }else {
            a[i][j]=0;
            ans+=go(i,j+1,n,m);
            a[i][j]=1;
            ans+=go(i,j+1,n,m);
        }

        return ans;

    }


    long M = (long)1e9+7;
    // END
    PrintWriter pw;
    StringTokenizer st;
    BufferedReader br;

    void run() throws Exception {
        br = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(System.out);
        long s = System.currentTimeMillis();
        solve();
        pw.flush();
    }
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    String ns() {
        while (st == null || !st.hasMoreElements()) {

            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    String nextLine() throws Exception {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            throw new Exception(e.toString());
        }
        return str;
    }

    int ni() {
        return Integer.parseInt(ns());
    }

    long nl() {
        return Long.parseLong(ns());
    }

    double nd() {
        return Double.parseDouble(ns());
    }
}