#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  const long long mod = 1e9 + 7, N = 1e5 + 9;
  long long fac[N] = {0, 1};
  for (long long i = 2; i < N; i++) {
    fac[i] = (fac[i - 1] + fac[i - 2]) % mod;
  }
  long long n, m;
  cin >> n >> m;
  cout << (2 * ((fac[++n] + fac[++m] - 1) % mod) % mod) << '\n';
  return 0;
}
