#include <bits/stdc++.h>
using namespace std;
const int p = 1e9 + 7;
const int maxn = 1e5 + 10;
long long f[maxn];
int main() {
  f[0] = f[1] = 1;
  for (int i = 2; i < maxn; i++) f[i] = (f[i - 1] + f[i - 2]) % p;
  int n, m;
  cin >> n >> m;
  cout << (2 * (f[n] + f[m]) - 2) % p;
  return 0;
}
