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