#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 2;
const int MAXLOG = log2(MAX) + 2;
const int MAXN = 1e6 + 2;
const int MOD = 1e9 + 7;
long long f[MAX];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  f[0] = 1;
  f[1] = 1;
  for (int i = 2; i < MAX; i++) {
    f[i] = (f[i - 1] + f[i - 2]) % MOD;
  }
  int n, m;
  cin >> n >> m;
  cout << (2 * ((f[n] + f[m] - 1 + MOD) % MOD)) % MOD;
  return 0;
}
