import java.util.Scanner;

public class SolutionC {
  static Scanner scanner = new Scanner(System.in);

  public static void main(String[] args) {
    int N = scanner.nextInt();
    int M = scanner.nextInt();
    if (N <= 0 || M <= 0) {
      System.out.println("0");
      return;
    }

    final long MODULO = 1000000007;

    int L = Math.max(M, N);
    int offset = 2;
    long[] vals = new long[L + offset];
    vals[0] = 0;
    vals[1] = 2;
    for (int i = 0; i < L; i++) {
      vals[offset + i] = (vals[offset + i - 1] + vals[offset + i - 2]) % MODULO;
    }
    System.out.println((vals[N - 1 + offset] + vals[M - 1 + offset]  - 2) % MODULO);
  }
}
