#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const int N = 1e5 + 1;
const int md = 1e9 + 7;
long long dp[N][2][2];
long long go(int pos, bool co1, bool co2) {
  if (dp[pos][co1][co2] != -1) return dp[pos][co1][co2];
  if (pos == 0) return 1;
  if (co1 == co2) return dp[pos][co1][co2] = go(pos - 1, co1 ^ 1, co1);
  return dp[pos][co1][co2] =
             (go(pos - 1, co1, co1) + go(pos - 1, co1 ^ 1, co1)) % md;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  memset(dp, -1, sizeof(dp));
  long long ans1 = go(n - 1, 1, 0) + go(n - 1, 0, 1);
  memset(dp, -1, sizeof(dp));
  long long ans2 = go(m - 1, 1, 0) + go(m - 1, 0, 1);
  cout << (ans1 + ans2 - 2) % md;
}
