#include <bits/stdc++.h>
using namespace std;
const int MX = (int)1e5 + 10;
const int mod = (int)1e9 + 7;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  int mx = max(n, m);
  int dp[mx + 1][2];
  memset(dp, 0x00, sizeof dp);
  dp[1][0] = 1;
  dp[2][0] = 1;
  dp[2][1] = 1;
  for (int i = 3; i <= mx; ++i) {
    int &fs = dp[i][0];
    fs = (dp[i - 2][0] + dp[i - 2][1]) % mod;
    fs += dp[i - 2][0];
    if (fs >= mod) fs -= mod;
    int &sc = dp[i][1];
    sc = dp[i - 2][0] + dp[i - 2][1];
    if (sc >= mod) sc -= mod;
  }
  int at_least_one_hz_strip = ((dp[n][0] + dp[n][1]) % mod) * 2;
  at_least_one_hz_strip %= mod;
  int at_least_one_vt_strip = ((dp[m][0] + dp[m][1]) % mod) * 2;
  at_least_one_vt_strip %= mod;
  int res = at_least_one_hz_strip + at_least_one_vt_strip - 2;
  if (res >= mod) res -= mod;
  if (res < 0) res += mod;
  cout << res << endl;
  return 0;
}
