    import java.io.*;
    import java.util.*;
     
    public class IvanFool {
    	
    	static FastReader sc=new FastReader();
    	
    	public static final long MOD=1000000007;
    	
    	void run() {
    	    int n=sc.nextInt();
    	    int m=sc.nextInt();
    	    
    	    long fib[]=new long[100003];
    	    fib[1]=1;
    	    fib[2]=2;
    	    for(int i=3;i<=Math.max(n,m);i++){
    	        fib[i]=(fib[i-1]+fib[i-2])%MOD;
    	    }
    	    long res=(((fib[n]+fib[m])%MOD)-1+MOD)%MOD;
    	    res=(2*res)%MOD;
    	    System.out.println(res);
    	}
    	
    	public static void main(String args[]) throws IOException {
    		new IvanFool().run();
    	}
    	
    	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; 
            } 
        }
     
    }