#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const int mod = 1e9 + 7;
int n, m;
int f[maxn];
int main() {
  scanf("%d%d", &n, &m);
  f[1] = f[2] = 1;
  for (int i = 3; i <= 1e5 + 5; i++) f[i] = (f[i - 1] + f[i - 2]) % mod;
  printf("%d", (f[n + 1] + f[m + 1] - 1) % mod * 2 % mod);
  return 0;
}
