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