#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int pd[100500][2];
long long rec(int at, int cor, long long a) {
  if (at == a) return 1;
  if (at == a - 1) return 1;
  if (pd[at][cor] != -1) return pd[at][cor];
  return pd[at][cor] =
             (1 + rec(at + 1, !cor, a) % MOD + rec(at + 2, !cor, a) % MOD) %
             MOD;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  memset(pd, -1, sizeof(pd));
  cin >> n >> m;
  long long resp = rec(0, 0, n) % MOD;
  memset(pd, -1, sizeof(pd));
  resp = (resp + rec(0, 0, m)) % MOD;
  cout << resp << "\n";
  exit(0);
}
