#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, dp[100100], mod = 1000000007;
  cin >> n >> m;
  dp[1] = 2;
  dp[2] = 4;
  for (int i = 3; i <= max(n, m); i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
    dp[i] %= mod;
  }
  cout << dp[n] + dp[m] - 2;
  return 0;
}
