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