#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long dp[100001][2][2];
long long process(long long index, bool prev_checkered, int maximum,
                  int dpindex) {
  if (index > maximum) {
    return 0;
  }
  if (index == maximum) {
    return 1;
  }
  if (dp[index][prev_checkered][dpindex] != -1)
    return dp[index][prev_checkered][dpindex];
  long long answer = process(index + 1, true, maximum, dpindex);
  answer = (answer + process(index + 2, false, maximum, dpindex)) % mod;
  return dp[index][prev_checkered][dpindex] = (answer % mod);
}
int main() {
  memset(dp, -1, sizeof dp);
  long long num_rows, num_columns;
  cin >> num_rows >> num_columns;
  long long answer =
      ((process(0, true, num_columns, 0) + process(0, true, num_rows, 1)) %
       mod * 2) %
      mod;
  answer -= 2;
  answer %= mod;
  if (answer < 0) answer += mod;
  cout << answer << endl;
}
