#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long dp[100010][2][2], t[100010];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  dp[1][1][0] = 1;
  t[1] = 1;
  for (int i = 2; i <= 100000; i++) {
    dp[i][0][0] = dp[i - 1][1][0];
    dp[i][0][1] = (dp[i - 1][0][0] + dp[i - 1][1][0]) % mod;
    dp[i][1][1] = dp[i - 1][0][1];
    dp[i][1][0] = (dp[i - 1][1][1] + dp[i - 1][0][1]) % mod;
    t[i] = (dp[i][0][0] + dp[i][0][1] + dp[i][1][0] + dp[i][1][1]) % mod;
  }
  printf("%lld\n", (t[n] + t[m] - 1 + mod) * 2ll % mod);
  return 0;
}
