#include <bits/stdc++.h>
using namespace std;
int n, m;
long long F[100000 + 10];
int main() {
  F[1] = 1;
  F[2] = 2;
  for (int i = 3; i <= 100000; i++) F[i] = (F[i - 1] + F[i - 2]) % 1000000007;
  scanf("%d%d", &n, &m);
  long long Ans = (F[n] + F[m] - 1) * 2 % 1000000007;
  printf("%I64d", Ans);
  return 0;
}
