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