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

public class CF {

  static int n, m;
  static int mod=(int)1e9+7;
  static int ans[] = new int[100001];

  static void solve() {
    ans[0] =1 ;
    ans[1] =1 ; 
    ans[2] =2;
    for (int i = 3; i < 100001; i++)
      ans[i] =( ans[i - 1] %mod + ans[i - 2] %mod) % mod;
  }

  public static void main(String[] arg) throws Exception{
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String s[] = bf.readLine().trim().split("\\s+");
    n = Integer.parseInt(s[0]);
    m = Integer.parseInt(s[1]);
    solve();
    System.out.println((2 * (ans[n] + ans[m] - 1)%mod)%mod);
  }
}
