#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 11;
const long long MOD = 1e9 + 7;
int n, m;
long long fibs[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  fibs[0] = 1;
  fibs[1] = 1;
  for (int i = 2; i < maxn; i++) {
    fibs[i] = fibs[i - 1] + fibs[i - 2];
    fibs[i] = (fibs[i] % MOD);
  }
  long long ans = (fibs[n] + fibs[m] - 1);
  ans %= MOD;
  ans *= 2;
  ans %= MOD;
  cout << ans << endl;
  return 0;
}
