#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long MAXN = 2e5 + 7;
const long long MAXM = 5e6 + 7;
const long long MOD = 1e9 + 7;
const double eps = 1e-6;
const double pi = acos(-1.0);
long long dp[MAXN];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int maxx = max(n, m);
  dp[1] = 2, dp[2] = 4;
  for (int i = 3; i <= maxx; i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
    dp[i] %= MOD;
  }
  printf("%lld\n", ((dp[n] + dp[m] - 2) % MOD + MOD) % MOD);
  return 0;
}
