#include <bits/stdc++.h>
using namespace std;
const int Maxk = 1e5 + 5, MOD = 1e9 + 7;
long long DP[Maxk];
int main() {
  int N, M;
  cin >> N >> M;
  int Max = max(N, M);
  int i;
  DP[1] = 1;
  DP[2] = 2;
  for (i = 3; i <= Max; i++) {
    DP[i] = DP[i - 1] + DP[i - 2];
    DP[i] %= MOD;
  }
  long long Ans = 0;
  Ans += (2 * DP[N]);
  Ans %= MOD;
  Ans += (2 * DP[M]);
  Ans %= MOD;
  Ans -= 2;
  cout << Ans % MOD;
}
