#include <bits/stdc++.h>
using namespace std;
long long A[100002], M = 1000000007;
int main() {
  long long N, a, b, i;
  A[0] = A[1] = 1;
  for (i = 1; i < 100002; ++i) A[i] = (A[i - 1] + A[i - 2]) % M;
  scanf("%I64d %I64d", &a, &b);
  printf("%I64d", (A[a + 1] + A[b + 1]) % M);
  return 0;
}
