/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
I'm working for the day I will surpass you
https://www.a2oj.com/Ladder16.html
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class x1248C
   {
      static long MOD = 1000000007L;
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         long[] fib = new long[100001];
         fib[0] = 1L;
         fib[1] = 1L;
         for(int i=2; i <= 100000; i++)
            fib[i] = (fib[i-1]+fib[i-2])%MOD;
         long res = fib[N]+fib[M]-1;
         res %= MOD;
         res = (2*res)%MOD;
         System.out.println(res);
      }
   }