#include <bits/stdc++.h>
long long F[110000] = {0, 1};
int main() {
  for (int i = 2; i < 110000; i++) F[i] = (F[i - 1] + F[i - 2]) % 1000000007;
  int n, m;
  scanf("%d%d", &n, &m);
  printf("%d", 2 * (F[n + 1] + F[m + 1] - 1) % 1000000007);
}
