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