#include <bits/stdc++.h>
using namespace std;
long long dp[111111][2];
int main() {
  long long mod = 1e9 + 7;
  int n, m;
  cin >> n >> m;
  int nn = max(n, m);
  dp[0][1] = 0;
  dp[0][0] = 1;
  for (int iter = 1; iter < nn; iter++) {
    dp[iter][1] = dp[iter - 1][0] % mod;
    dp[iter][0] = (dp[iter - 1][0] + dp[iter - 1][1]) % mod;
  }
  long long res1 = (dp[n - 1][0] + dp[n - 1][1]) % mod;
  long long res2 = (dp[m - 1][0] + dp[m - 1][1]) % mod;
  res1 = 2 * (res1 + res2);
  cout << res1 - 2;
  return 0;
}
