#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 100;
const long long MOD = 1e9 + 7;
long long n, m, fib[MAXN];
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  fib[0] = fib[1] = 1;
  for (int i = 2; i < MAXN; i++) fib[i] = (fib[i - 1] + fib[i - 2]) % MOD;
  cin >> n >> m;
  long long ans = 2 * (fib[n] + fib[m] - 1 % MOD) % MOD;
  cout << ans << endl;
  return 0;
}
