#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
long long mod = 1e9 + 7;
long long dp[N][2][2];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  dp[1][0][0] = dp[1][1][0] = 1;
  if (n < m) swap(n, m);
  for (int i = 2; i <= n; ++i) {
    dp[i][0][0] = (dp[i - 1][1][0] + dp[i - 1][1][1]) % mod;
    dp[i][1][0] = (dp[i - 1][0][0] + dp[i - 1][0][1]) % mod;
    dp[i][0][1] = dp[i - 1][0][0];
    dp[i][1][1] = dp[i - 1][1][0];
  }
  long long ans = 0;
  for (int i = 0; i <= 1; ++i) {
    for (int j = 0; j <= 1; ++j) {
      ans = (ans + dp[n][i][j] + dp[m][i][j]) % mod;
    }
  }
  printf("%lld", ((ans - 2) % mod + mod) % mod);
  return 0;
}
