#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int MAXN = 1e5;
long long F[MAXN + 1];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  F[0] = F[1] = 1;
  for (int i = 2; i <= MAXN; ++i) {
    F[i] = F[i - 1] + F[i - 2];
    if (F[i] >= MOD) F[i] -= MOD;
  }
  int n, m;
  cin >> n >> m;
  cout << 2 * (F[n] + F[m] + MOD - 1) % MOD << '\n';
  return 0;
}
