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