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