#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
vector<long long> f(2e5 + 10), inv_f(2e5 + 10);
int32_t main() {
  ios::sync_with_stdio(false);
  long long n, m;
  cin >> n >> m;
  f[0] = 1;
  f[1] = 1;
  for (long long i = 2; i <= 1e5 + 77; i++) {
    f[i] = f[i - 1] + f[i - 2];
    f[i] %= mod;
  }
  cout << ((f[n] + f[m] - 1) * 2) % mod << "\n";
  return 0;
}
