import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.util.StringTokenizer;

public class Contest {
	
	

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner();
		PrintWriter out = new PrintWriter(System.out);
		int MOD = (int)1e9+7;
		int nn = sc.nextInt(), mm = sc.nextInt();

		int last1 = 0, last = 2;
		int total = 2;
		while (--nn > 0) {
			total = (total+last)%MOD;
			int tmp = last;
			last = (last+last1)%MOD;
			last1 = tmp;
		}

		last1 = 0;
		last = 2;
		while (--mm > 0) {
			total = (total+last)%MOD;
			int tmp = last;
			last = (last+last1)%MOD;
			last1 = tmp;
		}
		System.out.println(total);

		out.close();

	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		Scanner() {

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

		String next() throws IOException {
			while (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return st.nextToken();
		}

		int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}
	}
}
