import java.io.*;
import java.util.*;
public class Main {
    public static void main(String args[])
    {
        FastReader input=new FastReader();
        PrintWriter out=new PrintWriter(System.out);
        int T=1;
        while(T-->0)
        {
            long n=input.nextInt();
            long m=input.nextInt();
            long mod=1000000007;
            long a[]=new long[100001];
            a[2]=2;
            a[3]=2;
            long x=2;
            for(int i=1;i<=m;i++)
            {
                if(i>3)
                {
                    a[i]=a[i-1]+a[i-2];
                }
                x=(x%mod+a[i]%mod)%mod;
            }
            a=new long[100001];
            a[2]=2;
            a[3]=2;
            for(int i=1;i<=n;i++)
            {
                if(i>3)
                {
                    a[i]=a[i-1]+a[i-2];
                }
                x=(x%mod+a[i]%mod)%mod;
            }
            out.println(x);
        }
        out.close();
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}