import java.io.*;
import java.util.*;
public final class code
{
	static final long mod=(long)(1e9+7);
	static long f[];
	static void solve()throws IOException
	{
		f=new long[(int)(1e5+1)];
		long a=1,b=1;
		for(int i=1;i<=(int)(1e5);i++)
		{
			f[i]=b;
			long c=(a+b)%mod;
			a=b;
			b=c;
		}
		int n=nextInt();
		int m=nextInt();
		long ans=((((f[n]+f[m])%mod-1+mod)%mod)*2)%mod;
		out.println(ans);
	}






	
	///////////////////////////////////////////////////////////
	static BufferedReader br;
	static StringTokenizer st;
	static PrintWriter out;
	static String nextToken()throws IOException
	{
		while(st==null || !st.hasMoreTokens())
			st=new StringTokenizer(br.readLine());
		return st.nextToken();
	}
	static String nextLine()throws IOException
	{
		return br.readLine();
	}
	static int nextInt()throws IOException
	{
		return Integer.parseInt(nextToken());
	}
	static long nextLong()throws IOException
	{
		return Long.parseLong(nextToken());
	}
	static double nextDouble()throws IOException
	{
		return Double.parseDouble(nextToken());
	}
	public static void main(String args[])throws IOException
	{
		br=new BufferedReader(new InputStreamReader(System.in));
		out=new PrintWriter(new BufferedOutputStream(System.out));
		solve();
		out.close();
	}
}